From: Harmon Date: Sun, 14 Feb 2021 06:42:19 +0000 (-0600) Subject: Stop allowing positional arguments for API.lists_memberships X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ec7601ff86b8198d80242718cfea898c3d35b0ee;p=tweepy.git Stop allowing positional arguments for API.lists_memberships Also improve endpoint parameters order to match Twitter API documentation --- diff --git a/tweepy/api.py b/tweepy/api.py index ea04d5c..fbca4fe 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -935,13 +935,13 @@ class API: @pagination(mode='cursor') @payload('list', list=True) - def lists_memberships(self, *args, **kwargs): + def lists_memberships(self, **kwargs): """ :reference: https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/get-lists-memberships """ return self.request( - 'GET', 'lists/memberships', *args, endpoint_parameters=( - 'screen_name', 'user_id', 'filter_to_owned_lists', 'cursor', - 'count' + 'GET', 'lists/memberships', endpoint_parameters=( + 'user_id', 'screen_name', 'count', 'cursor', + 'filter_to_owned_lists' ), **kwargs )