From ae18ee50c122d7cbe714ded3851eed3a765ff0c5 Mon Sep 17 00:00:00 2001 From: Harmon Date: Sun, 14 Feb 2021 00:55:21 -0600 Subject: [PATCH] Stop allowing positional arguments for API.add_list_member Also improve endpoint parameters order to match Twitter API documentation --- tweepy/api.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tweepy/api.py b/tweepy/api.py index 72505e1..b856644 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -990,13 +990,13 @@ class API: ) @payload('list') - def add_list_member(self, *args, **kwargs): + def add_list_member(self, **kwargs): """ :reference: https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/post-lists-members-create """ return self.request( - 'POST', 'lists/members/create', *args, endpoint_parameters=( - 'screen_name', 'user_id', 'owner_screen_name', 'owner_id', - 'slug', 'list_id' + 'POST', 'lists/members/create', endpoint_parameters=( + 'list_id', 'slug', 'user_id', 'screen_name', + 'owner_screen_name', 'owner_id' ), **kwargs ) -- 2.25.1