From: Harmon Date: Fri, 28 May 2021 11:24:02 +0000 (-0500) Subject: Rename API.show_friendship to API.get_friendship X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ee9ea2e4513db4d1d627a8815008cb8c71769949;p=tweepy.git Rename API.show_friendship to API.get_friendship --- diff --git a/cassettes/testshowfriendship.json b/cassettes/testgetfriendship.json similarity index 100% rename from cassettes/testshowfriendship.json rename to cassettes/testgetfriendship.json diff --git a/docs/api.rst b/docs/api.rst index da10794..e0df729 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -126,7 +126,7 @@ +------------------------------------------+-------------------------------------+ | `GET friendships/outgoing`_ | :meth:`API.friendships_outgoing` | +------------------------------------------+-------------------------------------+ - | `GET friendships/show`_ | :meth:`API.show_friendship` | + | `GET friendships/show`_ | :meth:`API.get_friendship` | +------------------------------------------+-------------------------------------+ | `GET users/lookup`_ | :meth:`API.lookup_users` | +------------------------------------------+-------------------------------------+ @@ -486,7 +486,7 @@ Follow, search, and get users .. automethod:: API.friendships_outgoing -.. automethod:: API.show_friendship +.. automethod:: API.get_friendship .. automethod:: API.lookup_users diff --git a/tests/test_api.py b/tests/test_api.py index 776ad5e..c52f571 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -156,9 +156,9 @@ class TweepyAPITests(TweepyTestCase): friend = self.api.create_friendship(screen_name='Twitter') self.assertEqual(friend.screen_name, 'Twitter') - @tape.use_cassette('testshowfriendship.json') - def testshowfriendship(self): - source, target = self.api.show_friendship(target_screen_name='twitter') + @tape.use_cassette('testgetfriendship.json') + def testgetfriendship(self): + source, target = self.api.get_friendship(target_screen_name='twitter') self.assertTrue(isinstance(source, Friendship)) self.assertTrue(isinstance(target, Friendship)) diff --git a/tweepy/api.py b/tweepy/api.py index 01966fc..a8ead9a 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -2279,9 +2279,9 @@ class API: ) @payload('friendship') - def show_friendship(self, **kwargs): - """show_friendship(*, source_id, source_screen_name, target_id, \ - target_screen_name) + def get_friendship(self, **kwargs): + """get_friendship(*, source_id, source_screen_name, target_id, \ + target_screen_name) Returns detailed information about the relationship between two users.