From: Josh Roesslein Date: Mon, 6 Jul 2009 03:20:50 +0000 (-0500) Subject: Added friends/followers get ids endpoints. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=58fe28e8e5fc3334a9c9b58acdcbaa3ca8e93f52;p=tweepy.git Added friends/followers get ids endpoints. --- diff --git a/api.py b/api.py index a0c8a93..e4ee61a 100644 --- 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') diff --git a/parsers.py b/parsers.py index 14d67c3..b20b206 100644 --- a/parsers.py +++ b/parsers.py @@ -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)