lichess-org / api

Lichess API documentation and examples
https://lichess.org/api
GNU Affero General Public License v3.0
417 stars 140 forks source link

When retrieving study chapters via API, how can I tell whether the perspective is white or black for that chapter? #222

Closed vesper8 closed 1 year ago

vesper8 commented 1 year ago

I feel like I've hit a bit of a roadblock here, I'm trying to determine whether the perspective for a specific study chapter is black or white.

The FEN provided is usually the start position and that doesn't indicate whether the board perspective is white or black.

I can't seem to derive that information from any of the other values returned in the PGN format. Am I missing something? Clearly Lichess stores this information as it correctly remembers and displays the chapters in the correct perspective.

vesper8 commented 1 year ago

I guess this value is set when setting the "Orientation" when configuring the chapter. But this is not currently returned via the API.

Any chance you could start to return this information please? Or is there another way?

Many thanks

tors42 commented 1 year ago

This has been added,, https://github.com/lichess-org/lila/issues/11916 Controlled by providing "orientation"-parameter, https://lichess.org/api#tag/Studies

So seems this issue can be closed