Added retweet API methods.
authorJosh Roesslein <jroesslein@gmail.com>
Thu, 17 Sep 2009 23:35:43 +0000 (18:35 -0500)
committerJosh Roesslein <jroesslein@gmail.com>
Thu, 17 Sep 2009 23:35:43 +0000 (18:35 -0500)
CHANGES
ROADMAP
tweepy/api.py

diff --git a/CHANGES b/CHANGES
index d763546a955e65d1f8c2f63b6a59fe20de32305f..6a79644dc46c07a4463c2330d0a3dab3360de59a 100644 (file)
--- 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 eb5b1e773472e33cf4553bb4911f3201b71fa1e2..b76fe1c8df35eb134d226d6c198395e93633a0b6 100644 (file)
--- 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
 
index 434645f892f1f1e704ec330e36721ab09654ce30..ecb9a255afbdec591f0b5b0a43bab8cd1730ab50 100644 (file)
@@ -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',