Skip to content

client.broadcasts: add search#145

Merged
kraktus merged 4 commits intolichess-org:masterfrom
DoraFgr:feature/broadcast-search
Nov 30, 2025
Merged

client.broadcasts: add search#145
kraktus merged 4 commits intolichess-org:masterfrom
DoraFgr:feature/broadcast-search

Conversation

@DoraFgr
Copy link
Copy Markdown
Contributor

@DoraFgr DoraFgr commented Nov 26, 2025

This PR is a small part of #6 and implements the broadcasts.search endpoint

Summary:

  • Implement client.broadcasts.search to search for broadcasts by query text
  • Rename BroadcastPastPage to PaginatedBroadcasts to better reflect type usage (used for both search results and past broadcasts in get_top())
  • Add test for broadcast.search with VCR cassette
  • Export BroadcastTop and PaginatedBroadcasts from berserk.types for consistent imports
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)

…tests

- Implemented `client.broadcasts.search` to search for broadcasts.
- Added `PaginatedBroadcasts` type for search results.
- Updated `__init__.py` to include `PaginatedBroadcasts`.
- Added test case for the new search functionality in `TestBroadcasts`.
- Created a new cassette for the search API response.
@DoraFgr DoraFgr marked this pull request as ready for review November 26, 2025 03:04
@kraktus kraktus merged commit 2865a14 into lichess-org:master Nov 30, 2025
30 checks passed
@kraktus
Copy link
Copy Markdown
Member

kraktus commented Nov 30, 2025

thanks!

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.

2 participants