Added favorite methods. create/destroy favorites not working yet.
authorJosh Roesslein <jroesslein@gmail.com>
Mon, 6 Jul 2009 04:07:54 +0000 (23:07 -0500)
committerJosh Roesslein <jroesslein@gmail.com>
Mon, 6 Jul 2009 04:07:54 +0000 (23:07 -0500)
api.py

diff --git a/api.py b/api.py
index 84e12567618e3c7c68d6b2604d3f58b7e85238d3..e79c85425181a01450d974fc957d088eff527b96 100644 (file)
--- a/api.py
+++ b/api.py
@@ -229,4 +229,29 @@ class API(object):
       require_auth = True
   )
 
+  """Get favorites"""
+  favorites = bind_api(
+      path = '/favorites.json',
+      parser = parse_statuses,
+      allowed_param = ['id', 'page']
+  )
+
+  """Create favorite"""
+  create_favorite = bind_api(
+      path = '/favorites/create.json',
+      method = 'POST',
+      parser = parse_status,
+      allowed_param = ['id'],
+      require_auth = True
+  )
+
+  """Destroy favorite"""
+  destroy_favorite = bind_api(
+      path = '/favorites/destroy.json',
+      method = 'DELETE',
+      parser = parse_status,
+      allowed_param = ['id'],
+      require_auth = True
+  )
+
 api = API('jitterapp', 'josh1987')