Permalink
Browse files

Update rst with Rate Example

  • Loading branch information...
1 parent 37effc3 commit e4159776c47ae8b27aa59eee39f602a381924b24 @joaquincasares joaquincasares committed Jul 9, 2012
Showing with 21 additions and 1 deletion.
  1. +21 −1 README.rst
View
@@ -103,4 +103,24 @@ Remove Gabriel Iglesias: Hot and Fluffy to Instant Queue
del_from_queue = n.delete('http://api-public.netflix.com/users/*final_user_id*/queues/instant/available/2/70072945')
- print del_from_queue
+ print del_from_queue
+
+Rate Gabriel Iglesias: Hot and Fluffy
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+::
+
+ 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

0 comments on commit e415977

Please sign in to comment.