Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Filter for Standard Starting Position in User Game Export API #266

Open
jassler opened this issue Jul 18, 2023 · 0 comments
Open

Add Filter for Standard Starting Position in User Game Export API #266

jassler opened this issue Jul 18, 2023 · 0 comments

Comments

@jassler
Copy link

jassler commented Jul 18, 2023

The User Game Export API (https://lichess.org/api/games/user/{username}) currently lacks an option to filter games based on the starting position. It would be helpful to have a query parameter to distinguish between games that start from the standard chess position and games with custom starting positions.

Current Behavior

There is no way to differentiate games that start from a standard position and those which start from a custom position.

Expected Behavior

A new query parameter, such as startingPosition or fromPosition, can be used to filter games starting from the standard position.

Alternatively, include a way to filter starting positions in perfType, which currently allows us to filter for chess variants such as "chess960", "crazyhouse", etc. The variant already displays [Variant "From Position"]. This would make it a little more consistent.

Proposed API call

https://lichess.org/api/games/user/{username}?perfType="blitz,fromPosition"

Returns all blitz games that did not start in the standard position.

Use Case

I often give my students positions as exercises from which they have to win or draw the computer. I’d like to be able to filter and find those games more easily.

Vice versa, it’d probably also be useful to reliably receiving games from normal starting positions without having to manually filter out those that are not.

Thank you for considering this request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant