Rename API.show_friendship to API.get_friendship
authorHarmon <Harmon758@gmail.com>
Fri, 28 May 2021 11:24:02 +0000 (06:24 -0500)
committerHarmon <Harmon758@gmail.com>
Fri, 28 May 2021 11:24:02 +0000 (06:24 -0500)
cassettes/testgetfriendship.json [moved from cassettes/testshowfriendship.json with 100% similarity]
docs/api.rst
tests/test_api.py
tweepy/api.py

index da1079466c7ef0ae1865d4150a97bbf1f1455175..e0df729451ad0f556e96915669dcf1a6467121d1 100644 (file)
     +------------------------------------------+-------------------------------------+
     | `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
 
index 776ad5e8acd640081c526bbd8fe42a7f1c0da1e5..c52f5714ed4dd78b1a84281de25b9e0ec1b484ed 100644 (file)
@@ -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))
 
index 01966fc427f80db57aef1ac26dabaf144b943cd5..a8ead9a17837c97163861f64bc64f70f8a781dab 100644 (file)
@@ -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.