Stop allowing positional arguments for API.destroy_block
authorHarmon <Harmon758@gmail.com>
Sat, 13 Feb 2021 22:17:16 +0000 (16:17 -0600)
committerHarmon <Harmon758@gmail.com>
Sat, 13 Feb 2021 22:17:16 +0000 (16:17 -0600)
Also improve endpoint parameters order to match Twitter API documentation

tweepy/api.py

index b875a52f29ff8c678bba4849085a3459f3fc7dd3..9dc02f3ccad4176075d585ef493ce778deb43701 100644 (file)
@@ -781,12 +781,12 @@ class API:
         )
 
     @payload('user')
-    def destroy_block(self, *args, **kwargs):
+    def destroy_block(self, **kwargs):
         """ :reference: https://developer.twitter.com/en/docs/accounts-and-users/mute-block-report-users/api-reference/post-blocks-destroy
         """
         return self.request(
-            'POST', 'blocks/destroy', *args, endpoint_parameters=(
-                'user_id', 'screen_name', 'include_entities', 'skip_status'
+            'POST', 'blocks/destroy', endpoint_parameters=(
+                'screen_name', 'user_id', 'include_entities', 'skip_status'
             ), **kwargs
         )