Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement /tv/{channel}/feed endpoint #78

Merged
merged 2 commits into from
Jun 24, 2024

Conversation

trevorbayless
Copy link
Member

@trevorbayless trevorbayless commented Jun 11, 2024

Implements the /tv/{channel}/feed endpoint and adds TypeDicts.

NOTE:
I attempted to add a test for this (test_tv.py) but for some reason vcrpy hangs during make test_record when hitting the test (possibly because this is a stream endpoint?). In the linked test, I clipped the stream at the first two results as this endpoint is an infinite stream.

Interestingly enough, if you remove @pytest.mark.vcr the test passes, but we want this as a cassette. I was able to manually create a cassette for this (TestTV.test_stream_bullet_tv.yaml) which works, but would be problematic if the cassette needs to be regenerated so I assume this isn't something we want to manually add. vcrpy is new to me, so if anyone has an idea on what the issue might be please let me know and I'll gladly add a test for this.

Checklist when adding a new endpoint
  • Added new endpoint to the README.md
  • Ensure 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
  • Tested 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)

@trevorbayless trevorbayless marked this pull request as draft June 11, 2024 23:20
@kraktus
Copy link
Member

kraktus commented Jun 24, 2024

Hey, sorry for the delay, I checked and found no documentation on how to handle infinite stream. Since it's not a big deal I'll merge, thanks!

@kraktus kraktus merged commit 3416a96 into lichess-org:master Jun 24, 2024
21 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.

2 participants