From: Harmon Date: Fri, 12 Feb 2021 03:38:10 +0000 (-0600) Subject: Stop allowing positional arguments for API.create_friendship X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=82cd7983d70d5260c1fa9290c1552227b70af00a;p=tweepy.git Stop allowing positional arguments for API.create_friendship Also improve endpoint parameters order to match Twitter API documentation --- 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 )