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

tweepy/api.py

index c96b6ff489b30bdf7cb12955dc7ca20c208155e1..8fe7c4b94ccd67d2a8a9a056f12f4d6799d27752 100644 (file)
@@ -969,12 +969,12 @@ class API:
 
     @pagination(mode='id')
     @payload('status', list=True)
-    def list_timeline(self, *args, **kwargs):
+    def list_timeline(self, **kwargs):
         """ :reference: https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/get-lists-statuses
         """
         return self.request(
-            'GET', 'lists/statuses', *args, endpoint_parameters=(
-                'owner_screen_name', 'slug', 'owner_id', 'list_id', 'since_id',
+            'GET', 'lists/statuses', endpoint_parameters=(
+                'list_id', 'slug', 'owner_screen_name', 'owner_id', 'since_id',
                 'max_id', 'count', 'include_entities', 'include_rts'
             ), **kwargs
         )