Replace API.unretweet id allowed_param with status_id parameter
authorHarmon <Harmon758@gmail.com>
Fri, 29 Jan 2021 02:15:39 +0000 (20:15 -0600)
committerHarmon <Harmon758@gmail.com>
Fri, 29 Jan 2021 02:20:32 +0000 (20:20 -0600)
tweepy/api.py

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