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 :/
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 :/