Skip to content

Commit

Permalink
Add support for get_list_tweets parameters
Browse files Browse the repository at this point in the history
Add support for media_fields, place_fields, and poll_fields parameters for get_list_tweets

Resolves #1931
  • Loading branch information
Harmon758 committed Aug 19, 2022
1 parent 9b636bc commit 08d5684
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
9 changes: 8 additions & 1 deletion tweepy/asynchronous/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2569,12 +2569,18 @@ async def get_list_tweets(self, id, *, user_auth=False, **params):
The maximum number of results to be returned per page. This can be
a number between 1 and 100. By default, each page will return 100
results.
media_fields : list[str] | str | None
:ref:`media_fields_parameter`
pagination_token : str | None
Used to request the next page of results if all results weren't
returned with the latest request, or to go back to the previous
page of results. To return the next page, pass the next_token
returned in your previous response. To go back one page, pass the
previous_token returned in your previous response.
place_fields : list[str] | str | None
:ref:`place_fields_parameter`
poll_fields : list[str] | str | None
:ref:`poll_fields_parameter`
tweet_fields : list[str] | str | None
:ref:`tweet_fields_parameter`
user_fields : list[str] | str | None
Expand All @@ -2593,7 +2599,8 @@ async def get_list_tweets(self, id, *, user_auth=False, **params):
return await self._make_request(
"GET", f"/2/lists/{id}/tweets", params=params,
endpoint_parameters=(
"expansions", "max_results", "pagination_token",
"expansions", "max_results", "media.fields",
"pagination_token", "place.fields", "poll.fields",
"tweet.fields", "user.fields"
), data_type=Tweet, user_auth=user_auth
)
Expand Down
9 changes: 8 additions & 1 deletion tweepy/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2775,12 +2775,18 @@ def get_list_tweets(self, id, *, user_auth=False, **params):
The maximum number of results to be returned per page. This can be
a number between 1 and 100. By default, each page will return 100
results.
media_fields : list[str] | str | None
:ref:`media_fields_parameter`
pagination_token : str | None
Used to request the next page of results if all results weren't
returned with the latest request, or to go back to the previous
page of results. To return the next page, pass the next_token
returned in your previous response. To go back one page, pass the
previous_token returned in your previous response.
place_fields : list[str] | str | None
:ref:`place_fields_parameter`
poll_fields : list[str] | str | None
:ref:`poll_fields_parameter`
tweet_fields : list[str] | str | None
:ref:`tweet_fields_parameter`
user_fields : list[str] | str | None
Expand All @@ -2799,7 +2805,8 @@ def get_list_tweets(self, id, *, user_auth=False, **params):
return self._make_request(
"GET", f"/2/lists/{id}/tweets", params=params,
endpoint_parameters=(
"expansions", "max_results", "pagination_token",
"expansions", "max_results", "media.fields",
"pagination_token", "place.fields", "poll.fields",
"tweet.fields", "user.fields"
), data_type=Tweet, user_auth=user_auth
)
Expand Down

0 comments on commit 08d5684

Please sign in to comment.