Add support for get_list_tweets parameters
authorHarmon <Harmon758@gmail.com>
Fri, 19 Aug 2022 14:52:24 +0000 (09:52 -0500)
committerHarmon <Harmon758@gmail.com>
Fri, 19 Aug 2022 14:52:24 +0000 (09:52 -0500)
Add support for media_fields, place_fields, and poll_fields parameters for get_list_tweets

Resolves #1931

tweepy/asynchronous/client.py
tweepy/client.py

index 0799c1c9733da28b9b68dc7460126572ba95d3d0..274f16d4401f5fc03d4a3eb144e13a413baabab8 100644 (file)
@@ -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
         )
index f9a19140b85a97f5e3dd4bcafeb9a5e68ae7ae2a..45ef842c6a9d1559296ede669cce45dd29334259 100644 (file)
@@ -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
         )