.. automethod:: API.destroy_mute
+.. automethod:: API.report_spam
+
Direct Message Methods
----------------------
:rtype: :class:`JSON` object
-Spam Reporting Methods
-----------------------
-
-.. method:: API.report_spam(id/screen_name/user_id, [perform_block])
-
- The user specified in the id is blocked by the authenticated user and
- reported as a spammer.
-
- :param id: |uid|
- :param screen_name: |screen_name|
- :param user_id: |user_id|
- :param perform_block: A boolean indicating if the reported account should be
- blocked. Defaults to True.
- :rtype: :class:`User` object
-
-
Search Methods
--------------
), **kwargs
)
+ @payload('user')
+ def report_spam(self, **kwargs):
+ """report_spam(*, screen_name, user_id, perform_block)
+
+ Report the specified user as a spam account to Twitter.
+
+ :param screen_name: |screen_name|
+ :param user_id: |user_id|
+ :param perform_block: A boolean indicating if the reported account
+ should be blocked. Defaults to True.
+
+ :rtype: :class:`User` object
+
+ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/mute-block-report-users/api-reference/post-users-report_spam
+ """
+ return self.request(
+ 'POST', 'users/report_spam', endpoint_parameters=(
+ 'screen_name', 'user_id', 'perform_block'
+ ), **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
), use_cache=False, **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
- """
- return self.request(
- 'POST', 'users/report_spam', endpoint_parameters=(
- 'screen_name', 'user_id', 'perform_block'
- ), **kwargs
- )
-
@payload('json')
def trends_available(self, **kwargs):
""" :reference: https://developer.twitter.com/en/docs/twitter-api/v1/trends/locations-with-trending-topics/api-reference/get-trends-available