Skip to content

Commit

Permalink
Stop allowing positional arguments for API.unsubscribe_list
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 15, 2021
1 parent ee3b718 commit 2df2311
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tweepy/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1076,12 +1076,12 @@ def subscribe_list(self, **kwargs):
)

@payload('list')
def unsubscribe_list(self, *args, **kwargs):
def unsubscribe_list(self, **kwargs):
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/post-lists-subscribers-destroy
"""
return self.request(
'POST', 'lists/subscribers/destroy', *args, endpoint_parameters=(
'owner_screen_name', 'slug', 'owner_id', 'list_id'
'POST', 'lists/subscribers/destroy', endpoint_parameters=(
'list_id', 'slug', 'owner_screen_name', 'owner_id'
), **kwargs
)

Expand Down

0 comments on commit 2df2311

Please sign in to comment.