Added friends/followers get ids endpoints.
authorJosh Roesslein <jroesslein@gmail.com>
Mon, 6 Jul 2009 03:20:50 +0000 (22:20 -0500)
committerJosh Roesslein <jroesslein@gmail.com>
Mon, 6 Jul 2009 03:20:50 +0000 (22:20 -0500)
api.py
parsers.py

diff --git a/api.py b/api.py
index a0c8a9371104bb57bcc632b07a823b29ec036c8e..e4ee61a57e033c2202f4d26602eecc55f802f2cc 100644 (file)
--- a/api.py
+++ b/api.py
@@ -171,4 +171,18 @@ class API(object):
                         'target_id', 'target_screen_name']
   )
 
+  """Get list of IDs of users the specified user is following"""
+  friends_ids = bind_api(
+      path = '/friends/ids.json',
+      parser = parse_ids,
+      allowed_param = ['id', 'user_id', 'screen_name', 'page']
+  )
+
+  """Get list of IDs of users following the specified user"""
+  followers_ids = bind_api(
+      path = '/followers/ids.json',
+      parser = parse_ids,
+      allowed_param = ['id', 'user_id', 'screen_name', 'page']
+  )
+
 api = API('jitterapp', 'josh1987')
index 14d67c3eba5ad192bd233e2e97ceacbbd273a8fd..b20b206af5bc57599231325de9416ff8839f5e99 100644 (file)
@@ -104,3 +104,7 @@ def parse_friendship(data, api):
 def parse_bool(data, api):
 
   return json.loads(data)
+
+def parse_ids(data, api):
+
+  return json.loads(data)