From 445da4ec69cdaf1199ac025e63d7ffc80dd9f27f Mon Sep 17 00:00:00 2001 From: Harmon Date: Thu, 18 Feb 2021 22:20:25 -0600 Subject: [PATCH] Stop allowing positional arguments besides q for API.search Also improve endpoint parameters order to match Twitter API documentation --- tweepy/api.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tweepy/api.py b/tweepy/api.py index 34e0a0c..3c07cd2 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -1136,13 +1136,13 @@ class API: @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 ) -- 2.25.1