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

tweepy/api.py

index 5b34c4f189cd9dbcab046a15dbc6eea8e65f6cc0..c96b6ff489b30bdf7cb12955dc7ca20c208155e1 100644 (file)
@@ -958,12 +958,12 @@ class API:
 
     @pagination(mode='cursor')
     @payload('list', list=True)
-    def lists_subscriptions(self, *args, **kwargs):
+    def lists_subscriptions(self, **kwargs):
         """ :reference: https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/get-lists-subscriptions
         """
         return self.request(
-            'GET', 'lists/subscriptions', *args, endpoint_parameters=(
-                'screen_name', 'user_id', 'cursor', 'count'
+            'GET', 'lists/subscriptions', endpoint_parameters=(
+                'user_id', 'screen_name', 'count', 'cursor'
             ), **kwargs
         )