Stop allowing positional arguments for API.list_subscribers
authorHarmon <Harmon758@gmail.com>
Mon, 15 Feb 2021 07:58:41 +0000 (01:58 -0600)
committerHarmon <Harmon758@gmail.com>
Mon, 15 Feb 2021 07:58:41 +0000 (01:58 -0600)
Also improve endpoint parameters order to match Twitter API documentation

tweepy/api.py

index 4b2b7231c49280825c0f48c8b28fb041fc461ac1..f89d877505051bcb0817a11dd272d47e14e7eac8 100644 (file)
@@ -1087,13 +1087,13 @@ class API:
 
     @pagination(mode='cursor')
     @payload('user', list=True)
-    def list_subscribers(self, *args, **kwargs):
+    def list_subscribers(self, **kwargs):
         """ :reference: https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/get-lists-subscribers
         """
         return self.request(
-            'GET', 'lists/subscribers', *args, endpoint_parameters=(
-                'owner_screen_name', 'slug', 'owner_id', 'list_id', 'cursor',
-                'count', 'include_entities', 'skip_status'
+            'GET', 'lists/subscribers', endpoint_parameters=(
+                'list_id', 'slug', 'owner_screen_name', 'owner_id', 'count',
+                'cursor', 'include_entities', 'skip_status'
             ), **kwargs
         )