From 82cd7983d70d5260c1fa9290c1552227b70af00a Mon Sep 17 00:00:00 2001 From: Harmon Date: Thu, 11 Feb 2021 21:38:10 -0600 Subject: [PATCH] Stop allowing positional arguments for API.create_friendship 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 f0ab39e..fa0c328 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -554,12 +554,12 @@ class API: ) @payload('user') - def create_friendship(self, *args, **kwargs): + def create_friendship(self, **kwargs): """ :reference: https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/post-friendships-create """ return self.request( - 'POST', 'friendships/create', *args, endpoint_parameters=( - 'user_id', 'screen_name', 'follow' + 'POST', 'friendships/create', endpoint_parameters=( + 'screen_name', 'user_id', 'follow' ), **kwargs ) -- 2.25.1