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

tweepy/api.py

index 7e71cdc6393845b85ada41917cb1050bdbe95af9..ea04d5c72ef69eb996e47c82b0b85e44aa16da28 100644 (file)
@@ -924,12 +924,12 @@ class API:
         )
 
     @payload('list', list=True)
-    def lists_all(self, *args, **kwargs):
+    def lists_all(self, **kwargs):
         """ :reference: https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/get-lists-list
         """
         return self.request(
-            'GET', 'lists/list', *args, endpoint_parameters=(
-                'screen_name', 'user_id', 'reverse'
+            'GET', 'lists/list', endpoint_parameters=(
+                'user_id', 'screen_name', 'reverse'
             ), **kwargs
         )