From 2df231158d08e05ccb2f08a020dea154681e2609 Mon Sep 17 00:00:00 2001 From: Harmon Date: Mon, 15 Feb 2021 01:56:01 -0600 Subject: [PATCH] Stop allowing positional arguments for API.unsubscribe_list Also improve endpoint parameters order to match Twitter API documentation --- tweepy/api.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tweepy/api.py b/tweepy/api.py index 8ceeb9b..4b2b723 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -1076,12 +1076,12 @@ class API: ) @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 ) -- 2.25.1