From: Harmon Date: Sat, 10 Apr 2021 14:47:41 +0000 (-0500) Subject: Update and improve documentation for API.mutes_ids X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=0f866557e091acdc88b5825ab13c04b480c20175;p=tweepy.git Update and improve documentation for API.mutes_ids Automatically use docstring for documentation Improve method and documentation order Add documentation for stringify_ids parameter Improve return type reference Improve capitalization --- diff --git a/docs/api.rst b/docs/api.rst index 4ad44d2..11ee389 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -175,6 +175,8 @@ Mute, block, and report users .. automethod:: API.blocks +.. automethod:: API.mutes_ids + Direct Message Methods ---------------------- @@ -304,14 +306,6 @@ Mute Methods :rtype: list of :class:`User` objects -.. method:: API.mutes_ids([cursor]) - - Returns an array of numeric user ids the authenticating user has muted. - - :param cursor: |cursor| - :rtype: list of Integers - - Spam Reporting Methods ---------------------- diff --git a/tweepy/api.py b/tweepy/api.py index ea30b74..385cfba 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -2050,6 +2050,26 @@ class API: ), **kwargs ) + @pagination(mode='cursor') + @payload('ids') + def mutes_ids(self, **kwargs): + """mutes_ids(*, stringify_ids, cursor) + + Returns an array of numeric user IDs the authenticating user has muted. + + :param stringify_ids: |stringify_ids| + :param cursor: |cursor| + + :rtype: list of :class:`int` + + :reference: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/mute-block-report-users/api-reference/get-mutes-users-ids + """ + return self.request( + 'GET', 'mutes/users/ids', endpoint_parameters=( + 'stringify_ids', 'cursor' + ), **kwargs + ) + def media_upload(self, filename, *, file=None, chunked=False, media_category=None, additional_owners=None, **kwargs): """ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/media/upload-media/overview @@ -2309,17 +2329,6 @@ class API: ), **kwargs ) - @pagination(mode='cursor') - @payload('ids') - def mutes_ids(self, **kwargs): - """ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/mute-block-report-users/api-reference/get-mutes-users-ids - """ - return self.request( - 'GET', 'mutes/users/ids', endpoint_parameters=( - 'stringify_ids', 'cursor' - ), **kwargs - ) - @pagination(mode='cursor') @payload('user', list=True) def mutes(self, **kwargs):