From: Harmon Date: Thu, 25 Aug 2022 08:10:59 +0000 (-0500) Subject: Add support for exclude parameter for get_quote_tweets X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=4f28bd85d85adf0fb735a3e24b45e7804c534aa7;p=tweepy.git Add support for exclude parameter for get_quote_tweets This was previously undocumented for the endpoint: https://twittercommunity.com/t/quote-tweets-api-can-use-exclude-parameter/171392 --- diff --git a/tweepy/asynchronous/client.py b/tweepy/asynchronous/client.py index 274f16d..27705a8 100644 --- a/tweepy/asynchronous/client.py +++ b/tweepy/asynchronous/client.py @@ -777,6 +777,9 @@ class AsyncClient(AsyncBaseClient): ---------- id : int | str Unique identifier of the Tweet to request. + exclude : list[str] | str | None + Comma-separated list of the types of Tweets to exclude from the + response. expansions : list[str] | str | None :ref:`expansions_parameter` max_results : int | None @@ -816,7 +819,7 @@ class AsyncClient(AsyncBaseClient): return await self._make_request( "GET", f"/2/tweets/{id}/quote_tweets", params=params, endpoint_parameters=( - "expansions", "max_results", "media.fields", + "exclude", "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 5f25c1a..aa3d34e 100644 --- a/tweepy/client.py +++ b/tweepy/client.py @@ -845,6 +845,9 @@ class Client(BaseClient): ---------- id : int | str Unique identifier of the Tweet to request. + exclude : list[str] | str | None + Comma-separated list of the types of Tweets to exclude from the + response. expansions : list[str] | str | None :ref:`expansions_parameter` max_results : int | None @@ -884,7 +887,7 @@ class Client(BaseClient): return self._make_request( "GET", f"/2/tweets/{id}/quote_tweets", params=params, endpoint_parameters=( - "expansions", "max_results", "media.fields", + "exclude", "expansions", "max_results", "media.fields", "pagination_token", "place.fields", "poll.fields", "tweet.fields", "user.fields" ), data_type=Tweet, user_auth=user_auth