-
Notifications
You must be signed in to change notification settings - Fork 37
Lichess API Worker
The Lichess API Worker is a local service running on the server to allow both Chesster and the website to coordinate calls to the Lichess API and avoid exceeding rate limits.
http://localhost:8880/lichessapi/{path}?priority={n}&max_retries={n}&{args}
Adds an API call for the URL https://en.lichess.org/{path}?{args}
to the execution queue. Higher priority calls are executed first. In case of failures (e.g. rate-limits) the retry count will be used.
A successful request returns HTTP 200 with a response body consisting of a string for a Redis key. The caller should poll Redis at redis://127.0.0.1:6379/1
for the provided key at an interval (e.g. 0.1s) until it is available (with some timeout, e.g. 2 minutes). A successful call to the Lichess API will set the value in Redis to the Lichess API call's response body. A failed call (that exceeded the retry count) will set it to an empty string.
These are just conventions. Any relative numeric values will do.
0 - Background updates 1 - Manual updates 10 - Responsiveness is critical