Stop allowing positional arguments for API.create_mute
authorHarmon <Harmon758@gmail.com>
Sun, 14 Feb 2021 06:08:58 +0000 (00:08 -0600)
committerHarmon <Harmon758@gmail.com>
Sun, 14 Feb 2021 06:08:58 +0000 (00:08 -0600)
Also improve endpoint parameters order to match Twitter API documentation

tweepy/api.py

index 5a4a5dd35dea8c26fa3899bb87def6a2b51396fd..259b1c9f140b27abfebd6b8a081038ab107c504d 100644 (file)
@@ -813,12 +813,12 @@ class API:
         )
 
     @payload('user')
-    def create_mute(self, *args, **kwargs):
+    def create_mute(self, **kwargs):
         """ :reference: https://developer.twitter.com/en/docs/accounts-and-users/mute-block-report-users/api-reference/post-mutes-users-create
         """
         return self.request(
-            'POST', 'mutes/users/create', *args, endpoint_parameters=(
-                'user_id', 'screen_name'
+            'POST', 'mutes/users/create', endpoint_parameters=(
+                'screen_name', 'user_id'
             ), **kwargs
         )