Skip to content

Commit

Permalink
Stop allowing positional arguments besides q for API.search
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 19, 2021
1 parent 9377e7e commit 445da4e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tweepy/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1136,13 +1136,13 @@ def trends_closest(self, lat, long, **kwargs):

@pagination(mode='id')
@payload('search_results')
def search(self, q, *args, **kwargs):
def search(self, q, **kwargs):
""" :reference: https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets
"""
return self.request(
'GET', 'search/tweets', q, *args, endpoint_parameters=(
'q', 'lang', 'locale', 'since_id', 'geocode', 'max_id',
'until', 'result_type', 'count', 'include_entities'
'GET', 'search/tweets', q, endpoint_parameters=(
'q', 'geocode', 'lang', 'locale', 'result_type', 'count',
'until', 'since_id', 'max_id', 'include_entities'
), **kwargs
)

Expand Down

0 comments on commit 445da4e

Please sign in to comment.