Skip to content

Commit

Permalink
Stop allowing positional arguments for API.report_spam
Browse files Browse the repository at this point in the history
Also improve endpoint parameters order to match Twitter API documentation
  • Loading branch information
Harmon758 committed Feb 14, 2021
1 parent ff38b70 commit f55efcf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tweepy/api.py
Expand Up @@ -855,12 +855,12 @@ def blocks_ids(self, **kwargs):
)

@payload('user')
def report_spam(self, *args, **kwargs):
def report_spam(self, **kwargs):
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/mute-block-report-users/api-reference/post-users-report_spam
"""
return self.request(
'POST', 'users/report_spam', *args, endpoint_parameters=(
'user_id', 'screen_name', 'perform_block'
'POST', 'users/report_spam', endpoint_parameters=(
'screen_name', 'user_id', 'perform_block'
), **kwargs
)

Expand Down

0 comments on commit f55efcf

Please sign in to comment.