lichess-org / lila

♞ lichess.org: the forever free, adless and open source chess server ♞
https://lichess.org
GNU Affero General Public License v3.0
15.62k stars 2.28k forks source link

Make API Pages Clearer #12510

Closed cFlour closed 1 year ago

cFlour commented 1 year ago

Hello, I was trying to find all the game IDs of the games a player played in a certain timeframe via lichess API. These are the filters I tried to use: https://lichess.org/api/games/export/_ids/user/SirKex?clocks=True&since=1678555500000&until=1678562700000&perfType=Antichess&rated=True I don't know much about programming, but I assumed the ? after defining the operation and the & separation between filters would give me the desired output. But it says page not found. It would be nice if lichess made a section on their API documentation page on how to add the filters to that operation. Here is the page I tried to understand: https://lichess.org/api#tag/Games/operation/gamesExportIds

kraktus commented 1 year ago

Hey, it's not clear how you are using the games/export/_ids endpoint. Do you paste the above mentioned URL into the browser or use an API client/program to do so?

niklasf commented 1 year ago

In any case /api/games/export/_ids/user/ is not a thing.

You probably meant to use https://lichess.org/api#tag/Games/operation/apiUserCurrentGame, e.g. https://lichess.org/api/games/user/SirKex?clocks=True&since=1678555500000&until=1678562700000&perfType=Antichess&rated=True