Skip to content

#6 Add Games.export_bookmarks#7

Open
nstillman-te wants to merge 1 commit intomasterfrom
feature/chess-120-games-export-bookmarks-#6
Open

#6 Add Games.export_bookmarks#7
nstillman-te wants to merge 1 commit intomasterfrom
feature/chess-120-games-export-bookmarks-#6

Conversation

@nstillman-te
Copy link
Copy Markdown

Part of #6.

Implements GET /api/games/export/bookmarks: client.games.export_bookmarks(**params) streams the authenticated user's bookmarked games (PGN or NDJSON). Requires OAuth2. Same pattern as export_by_player (params: since, until, max, moves, tags, clocks, evals, etc.). Tests use requests-mock (endpoint requires auth). README.rst and CHANGELOG.rst updated.

Checklist when adding a new endpoint
  • Added new endpoint to the README.rst
  • Ensured that my endpoint name does not repeat the name of the client. Wrong: client.users.get_user(), Correct: client.users.get() — method is export_bookmarks
  • Typed the returned JSON using TypedDicts in berserk/types/ — N/A: response is a stream of existing Game objects (same as export_by_player), no new types
  • Written tests for GET endpoints not requiring authentification — endpoint requires auth; added requests-mock test for path and query params (see CONTRIBUTING.rst)
  • Added the endpoint to CHANGELOG.rst in the To be released section

Implement GET /api/games/export/bookmarks: export the authenticated user's
bookmarked games as a stream (PGN or NDJSON). Requires OAuth2.
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.

1 participant