Replace API.retweet id allowed_param with status_id parameter
authorHarmon <Harmon758@gmail.com>
Fri, 29 Jan 2021 02:14:42 +0000 (20:14 -0600)
committerHarmon <Harmon758@gmail.com>
Fri, 29 Jan 2021 02:19:46 +0000 (20:19 -0600)
tweepy/api.py

index 18d7f43faf4c8c1953bf860bcee0381e94f0d479..9d80f465fff252eda3e84f2f5cd35634fa9d5e7f 100644 (file)
@@ -278,16 +278,15 @@ class API:
             require_auth=True, **kwargs
         )
 
-    def retweet(self, *args, **kwargs):
+    def retweet(self, status_id, *args, **kwargs):
         """ :reference: https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/post-statuses-retweet-id
-            :allowed_param: 'id'
+            :allowed_param:
         """
         return bind_api(
             *args, api=self,
-            path='/statuses/retweet/{id}.json',
+            path=f'/statuses/retweet/{status_id}.json',
             method='POST',
             payload_type='status',
-            allowed_param=['id'],
             require_auth=True, **kwargs
         )