Stop allowing positional arguments besides q for API.search_users
authorHarmon <Harmon758@gmail.com>
Wed, 10 Feb 2021 19:21:48 +0000 (13:21 -0600)
committerHarmon <Harmon758@gmail.com>
Wed, 10 Feb 2021 19:21:48 +0000 (13:21 -0600)
Also improve endpoint parameters order to match Twitter API documentation

tweepy/api.py

index 230f4d53e3301a566dd25ae8a3d716d83aeecc0b..b05b88a2b826373f0b71909e520c3396d2b3efcf 100644 (file)
@@ -481,12 +481,12 @@ class API:
 
     @pagination(mode='page')
     @payload('user', list=True)
-    def search_users(self, q, *args, **kwargs):
+    def search_users(self, q, **kwargs):
         """ :reference: https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-users-search
         """
         return self.request(
-            'GET', 'users/search', q, *args, endpoint_parameters=(
-                'q', 'count', 'page', 'include_entities'
+            'GET', 'users/search', q, endpoint_parameters=(
+                'q', 'page', 'count', 'include_entities'
             ), **kwargs
         )