From: Josh Roesslein Date: Thu, 17 Sep 2009 23:35:43 +0000 (-0500) Subject: Added retweet API methods. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c34a3f7317308f704dabf803ed672138326d8687;p=tweepy.git Added retweet API methods. --- diff --git a/CHANGES b/CHANGES index d763546..6a79644 100644 --- a/CHANGES +++ b/CHANGES @@ -5,6 +5,7 @@ during upgrade will be listed here. ======================= + Fixes + Google App Engine fixes (thanks Thomas Bohmbach, Jr) ++ Added Retweet API methods 1.0 -> 1.0.1 ============ diff --git a/ROADMAP b/ROADMAP index eb5b1e7..b76fe1c 100644 --- a/ROADMAP +++ b/ROADMAP @@ -3,6 +3,6 @@ The plan of attack for the next version of Tweepy. 1.0.1 -> 1.0.2 ============ + implement win32 file locking for FileCache -+ merge retweet API methods into master -+ implement retweet streaming API method ++ add retweet API methods [DONE] ++ add retweet streaming method diff --git a/tweepy/api.py b/tweepy/api.py index 434645f..ecb9a25 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -43,6 +43,14 @@ class API(object): allowed_param = [] ) + """Get home timeline""" + home_timeline = bind_api( + path = '/statuses/home_timeline.json', + parser = parse_statuses, + allowed_param = ['since_id', 'max_id', 'count', 'page'], + require_auth = True + ) + """Get friends timeline""" friends_timeline = bind_api( path = '/statuses/friends_timeline.json', @@ -67,6 +75,30 @@ class API(object): require_auth = True ) + """Get Retweets posted by user""" + retweeted_by_me = bind_api( + path = '/statuses/retweeted_by_me.json', + parser = parse_statuses, + allowed_param = ['since_id', 'max_id', 'count', 'page'], + require_auth = True + ) + + """Get Retweets posted by user's friends""" + retweeted_to_me = bind_api( + path = '/statuses/retweeted_to_me.json', + parser = parse_statuses, + allowed_param = ['since_id', 'max_id', 'count', 'page'], + require_auth = True + ) + + """Get Retweets of the user's tweets posted by others""" + retweets_of_me = bind_api( + path = '/statuses/retweets_of_me.json', + parser = parse_statuses, + allowed_param = ['since_id', 'max_id', 'count', 'page'], + require_auth = True + ) + """Show status""" get_status = bind_api( path = '/statuses/show.json', @@ -92,6 +124,15 @@ class API(object): require_auth = True ) + """Retweet a tweet""" + retweet = bind_api( + path = '/statuses/retweet/id.json', + method = 'POST', + parser = parse_status, + allowed_param = ['id'], + require_auth = True + ) + """Show user""" get_user = bind_api( path = '/users/show.json',