Skip to content

Commit

Permalink
Stop allowing positional arguments besides q for API.search_users
Browse files Browse the repository at this point in the history
Also improve endpoint parameters order to match Twitter API documentation
  • Loading branch information
Harmon758 committed Feb 10, 2021
1 parent 8d64b61 commit 76ca416
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tweepy/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,12 +481,12 @@ def me(self):

@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
)

Expand Down

0 comments on commit 76ca416

Please sign in to comment.