Skip to content

Commit

Permalink
Support new endpoint parameters for Client.get_liking_users
Browse files Browse the repository at this point in the history
Add support for max_results and pagination_token endpoint parameters to Client.get_liking_users
  • Loading branch information
Harmon758 committed Feb 9, 2022
1 parent 3479e56 commit bdd6b55
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tweepy/client.py
Expand Up @@ -305,8 +305,18 @@ def get_liking_users(self, id, *, user_auth=False, **params):
Tweet ID of the Tweet to request liking users of.
expansions : Union[List[str], str]
:ref:`expansions_parameter`
max_results : int
The maximum number of results to be returned per page. This can be
a number between 1 and 1000. By default, each page will return 100
results.
media_fields : Union[List[str], str]
:ref:`media_fields_parameter`
pagination_token : str
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 : Union[List[str], str]
:ref:`place_fields_parameter`
poll_fields : Union[List[str], str]
Expand All @@ -329,7 +339,8 @@ def get_liking_users(self, id, *, user_auth=False, **params):
return self._make_request(
"GET", f"/2/tweets/{id}/liking_users", params=params,
endpoint_parameters=(
"expansions", "media.fields", "place.fields", "poll.fields",
"expansions", "max_results", "media.fields",
"pagination_token", "place.fields", "poll.fields",
"tweet.fields", "user.fields"
), data_type=User, user_auth=user_auth
)
Expand Down

2 comments on commit bdd6b55

@Harmon758

This comment was marked as resolved.

@Harmon758

This comment was marked as resolved.

Please sign in to comment.