Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Create rating example

  • Loading branch information...
commit 37effc3b1f58a496b038c4e009104bb6e19cd9f8 1 parent 28c1355
Joaquin Casares authored
Showing with 19 additions and 0 deletions.
  1. +19 −0 README.md
View
19 README.md
@@ -86,4 +86,23 @@ except NetflixAPIError:
del_from_queue = n.delete('http://api-public.netflix.com/users/*final_user_id*/queues/instant/available/2/70072945')
print del_from_queue
+```
+
+###### Rate Gabriel Iglesias: Hot and Fluffy
+```python
+try:
+ # Create a new rating
+ create_rating = n.post('users/*final_user_id*/ratings/title/actual/70072945', params={'rating': '5'})
+
+ print create_rating
+except NetflixAPIError:
+ # This returns a status message if successful.
+ # If it's already been rated, it will return a NetflixAPIError, code 422
+ pass
+
+
+# Update/Clear rating
+update_rating = n.put('users/*final_user_id*/ratings/title/actual/70072945', params={'rating': 'no_opinion'})
+
+print update_rating
```
Please sign in to comment.
Something went wrong with that request. Please try again.