Skip to content

Commit

Permalink
Support new endpoint parameter for Client.search_recent_tweets
Browse files Browse the repository at this point in the history
Support new sort_order endpoint parameter for Client.search_recent_tweets
  • Loading branch information
Harmon758 committed Feb 10, 2022
1 parent bd202e5 commit 8b47170
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tweepy/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -839,6 +839,10 @@ def search_recent_tweets(self, query, *, user_auth=False, **params):
than) the specified ID. The ID specified is exclusive and responses
will not include it. If included with the same request as a
``start_time`` parameter, only ``since_id`` will be used.
sort_order : str
This parameter is used to specify the order in which you want the
Tweets returned. By default, a request will return the most recent
Tweets first (sorted by recency).
start_time : Union[datetime.datetime, str]
YYYY-MM-DDTHH:mm:ssZ (ISO 8601/RFC 3339). The oldest UTC timestamp
(from most recent seven days) from which the Tweets will be
Expand Down Expand Up @@ -878,8 +882,8 @@ def search_recent_tweets(self, query, *, user_auth=False, **params):
endpoint_parameters=(
"end_time", "expansions", "max_results", "media.fields",
"next_token", "place.fields", "poll.fields", "query",
"since_id", "start_time", "tweet.fields", "until_id",
"user.fields"
"since_id", "sort_order", "start_time", "tweet.fields",
"until_id", "user.fields"
), data_type=Tweet, user_auth=user_auth
)

Expand Down

0 comments on commit 8b47170

Please sign in to comment.