Skip to content

Implemented client.studies.get_by_user#146

Merged
kraktus merged 9 commits intolichess-org:masterfrom
JAMoreno-Larios:list_user_studies
Dec 2, 2025
Merged

Implemented client.studies.get_by_user#146
kraktus merged 9 commits intolichess-org:masterfrom
JAMoreno-Larios:list_user_studies

Conversation

@JAMoreno-Larios
Copy link
Contributor

Implemented /api/study/by{username} under clients.studies.list_by_username to get an iterator that yields the metadata of all studies of a given user.

Now, the interesting question: how can we write a test for this? There is no way to programmatically add new studies to a given user, and the studies that can be seeded with lila-db-seed are from users that do not have an account in that database.

Should I manually clone those studies and record the responses using pytest-recording? I'd appreciate your feedback

Checklist when adding a new endpoint
  • Added new endpoint to the README.md
  • Ensured that my endpoint name does not repeat the name of the client. Wrong: client.users.get_user(), Correct: client.users.get()
  • Typed the returned JSON using TypedDicts in berserk/types/, example
  • Written tests for GET endpoints not requiring authentification. Documentation, example
  • Added the endpoint and your name to CHANGELOG.md in the To be released section (to be created if necessary)

@fitztrev fitztrev marked this pull request as ready for review December 1, 2025 20:43
@kraktus kraktus changed the title Implemented client.studies.list_by_username Implemented client.studies.get_by_user Dec 2, 2025
@kraktus kraktus merged commit 0632b38 into lichess-org:master Dec 2, 2025
30 checks passed
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

Successfully merging this pull request may close these issues.

3 participants