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

Add functionality for thumb ratings #9

Merged
merged 1 commit into from
Oct 13, 2018
Merged

Add functionality for thumb ratings #9

merged 1 commit into from
Oct 13, 2018

Conversation

LBBO
Copy link
Owner

@LBBO LBBO commented Oct 13, 2018

In 2017, netflix changed it's rating system from stars to thumbs. The objects returned in getRatingHistory contain information about whether a rating was made as a star or a thumb rating but setVideoRating is not able to set a thumb rating.

I added a setThumbRating function (and endpoint URL) to do just that. In order to avoid duplicate code, I extracted most of the logic into a helper function (__setRating) that is called by both setVideoRating and setThumbRating. I also noticed, that the setThumbRating endpoint expects a titleId (upper-case i) whereas the setVideoRating endpoint expects a titleid (lower-case i), which is also considered in the code.

@genderquery genderquery merged commit 158eb57 into LBBO:master Oct 13, 2018
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