From: Harmon Date: Fri, 12 Feb 2021 03:45:27 +0000 (-0600) Subject: Stop allowing positional arguments for API.destroy_friendship X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b2d44fed587132b866401dcd0c02cb9bc0b3a130;p=tweepy.git Stop allowing positional arguments for API.destroy_friendship Also improve endpoint parameters order to match Twitter API documentation --- diff --git a/tweepy/api.py b/tweepy/api.py index a47f491..97b3451 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -564,12 +564,12 @@ class API: ) @payload('user') - def destroy_friendship(self, *args, **kwargs): + def destroy_friendship(self, **kwargs): """ :reference: https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/post-friendships-destroy """ return self.request( - 'POST', 'friendships/destroy', *args, endpoint_parameters=( - 'user_id', 'screen_name' + 'POST', 'friendships/destroy', endpoint_parameters=( + 'screen_name', 'user_id' ), **kwargs )