Skip to content

Commit

Permalink
Rename API.show_friendship to API.get_friendship
Browse files Browse the repository at this point in the history
  • Loading branch information
Harmon758 committed May 28, 2021
1 parent bf26301 commit ee9ea2e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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` |
+------------------------------------------+-------------------------------------+
Expand Down Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ def testcreatedestroyfriendship(self):
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))

Expand Down
6 changes: 3 additions & 3 deletions tweepy/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2279,9 +2279,9 @@ def friendships_outgoing(self, **kwargs):
)

@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.
Expand Down

0 comments on commit ee9ea2e

Please sign in to comment.