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

tweepy/api.py

index 9895012cf3240afd2c44d60496b74f9653420e87..bccff3d03c14990c35fbf19a51b6193b871b39a9 100644 (file)
@@ -740,12 +740,12 @@ class API:
 
     @pagination(mode='id')
     @payload('status', list=True)
-    def favorites(self, *args, **kwargs):
+    def favorites(self, **kwargs):
         """ :reference: https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/get-favorites-list
         """
         return self.request(
-            'GET', 'favorites/list', *args, endpoint_parameters=(
-                'screen_name', 'user_id', 'max_id', 'count', 'since_id',
+            'GET', 'favorites/list', endpoint_parameters=(
+                'user_id', 'screen_name', 'count', 'since_id', 'max_id',
                 'include_entities'
             ), **kwargs
         )