From b2d44fed587132b866401dcd0c02cb9bc0b3a130 Mon Sep 17 00:00:00 2001 From: Harmon Date: Thu, 11 Feb 2021 21:45:27 -0600 Subject: [PATCH] Stop allowing positional arguments for API.destroy_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 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 ) -- 2.25.1