add unretweet api
authorlegokichi <legokichi@gmail.com>
Tue, 24 May 2016 16:57:51 +0000 (01:57 +0900)
committerlegokichi <legokichi@gmail.com>
Tue, 24 May 2016 16:57:51 +0000 (01:57 +0900)
tweepy/api.py

index b925da3884a84cc9efee4f58850701dc2ac96592..f46b66073dfbec66f2dd8abf91e1ebaf6a8ab40c 100644 (file)
@@ -259,6 +259,21 @@ class API(object):
             require_auth=True
         )
 
+    @property
+    def unretweet(self):
+        """ :reference: https://dev.twitter.com/rest/reference/post/statuses/unretweet/%3Aid
+            :allowed_param:'id'
+        """
+        return bind_api(
+            api=self,
+            path='/statuses/unretweet/{id}.json',
+            method='POST',
+            payload_type='status',
+            allowed_param=['id'],
+            require_auth=True
+        )
+
+
     @property
     def retweets(self):
         """ :reference: https://dev.twitter.com/rest/reference/get/statuses/retweets/%3Aid