Add support for importing PGN into study#53
Merged
ion232 merged 2 commits intoion232:mainfrom Apr 17, 2024
Merged
Conversation
Contributor
Author
|
PS: if merged, the issue #26 can be updated to reflect that this endpoint is supported |
Owner
|
Sorry for the late review - thanks for the changes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the ability to send a PGN into a study (this endpoint).
I tested this (all chapters in this study are imported using this code) with no issues.
I have begun work to implement the whole Studies API endpoint. However, the output of the Lichess API is very messy: we need to parse a non-standard data format (application/chess-x-pgn). You can see my first try in this PR (not mergeable).
Will maybe continue working on this but I think it won't be the most used feature of the Lichess API: it's way easier to consult studies directly on the Lichess interface. However, sending a PGN into a study is something more people would want to do (at least, I will need this for my project).
If someone wants to give it a go to implement the rest of the Studies API endpoint I can help! But as you can see in the linked PR above, it's a mess :/