From 08d56844369f0b6868050ab53e86f953b450c2ff Mon Sep 17 00:00:00 2001 From: Harmon Date: Fri, 19 Aug 2022 09:52:24 -0500 Subject: [PATCH] Add support for get_list_tweets parameters Add support for media_fields, place_fields, and poll_fields parameters for get_list_tweets Resolves #1931 --- tweepy/asynchronous/client.py | 9 ++++++++- tweepy/client.py | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/tweepy/asynchronous/client.py b/tweepy/asynchronous/client.py index 0799c1c..274f16d 100644 --- a/tweepy/asynchronous/client.py +++ b/tweepy/asynchronous/client.py @@ -2569,12 +2569,18 @@ class AsyncClient(AsyncBaseClient): 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 @@ -2593,7 +2599,8 @@ class AsyncClient(AsyncBaseClient): 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 ) diff --git a/tweepy/client.py b/tweepy/client.py index f9a1914..45ef842 100644 --- a/tweepy/client.py +++ b/tweepy/client.py @@ -2775,12 +2775,18 @@ class Client(BaseClient): 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 @@ -2799,7 +2805,8 @@ class Client(BaseClient): 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 ) -- 2.25.1