.. automethod:: API.destroy_saved_search
+Mute, block, and report users
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. automethod:: API.blocks_ids
+
Direct Message Methods
----------------------
:rtype: list of :class:`User` objects
-.. method:: API.blocks_ids([cursor])
-
- Returns an array of numeric user ids the authenticating user is blocking.
-
- :param cursor: |cursor|
- :rtype: list of Integers
-
-
Mute Methods
------------
"""
return self.request('POST', f'saved_searches/destroy/{id}', **kwargs)
+ # Mute, block, and report users
+
+ @pagination(mode='cursor')
+ @payload('ids')
+ def blocks_ids(self, **kwargs):
+ """blocks_ids(*, stringify_ids, cursor)
+
+ Returns an array of numeric user IDs the authenticating user is
+ blocking.
+
+ :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-blocks-ids
+ """
+ return self.request(
+ 'GET', 'blocks/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
), **kwargs
)
- @pagination(mode='cursor')
- @payload('ids')
- def blocks_ids(self, **kwargs):
- """ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/mute-block-report-users/api-reference/get-blocks-ids
- """
- return self.request(
- 'GET', 'blocks/ids', endpoint_parameters=(
- 'stringify_ids', 'cursor',
- ), **kwargs
- )
-
@payload('user')
def report_spam(self, **kwargs):
""" :reference: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/mute-block-report-users/api-reference/post-users-report_spam