Rename API.friends_ids to API.get_friend_ids
authorHarmon <Harmon758@gmail.com>
Thu, 3 Jun 2021 12:18:43 +0000 (07:18 -0500)
committerHarmon <Harmon758@gmail.com>
Thu, 3 Jun 2021 12:18:43 +0000 (07:18 -0500)
cassettes/testgetfriendids.yaml [moved from cassettes/testfriendsids.yaml with 100% similarity]
docs/api.rst
tests/test_api.py
tests/test_cursors.py
tweepy/api.py

index 289eeffcb4e559aa336aee193a2071f4be81ad1c..2050be9374c80f410772b0d88089fb730069c82b 100644 (file)
     +------------------------------------------+--------------------------------------+
     | `GET followers/list`_                    | :meth:`API.get_followers`            |
     +------------------------------------------+--------------------------------------+
-    | `GET friends/ids`_                       | :meth:`API.friends_ids`              |
+    | `GET friends/ids`_                       | :meth:`API.get_friend_ids`           |
     +------------------------------------------+--------------------------------------+
     | `GET friends/list`_                      | :meth:`API.get_friends`              |
     +------------------------------------------+--------------------------------------+
@@ -474,7 +474,7 @@ Follow, search, and get users
 
 .. automethod:: API.get_followers
 
-.. automethod:: API.friends_ids
+.. automethod:: API.get_friend_ids
 
 .. automethod:: API.get_friends
 
index 8e3f95220f1e135453b920ab8775a3da6419b294..bb78ea1dacded8741a4c653849c113a24badd8eb 100644 (file)
@@ -162,9 +162,9 @@ class TweepyAPITests(TweepyTestCase):
         self.assertTrue(isinstance(source, Friendship))
         self.assertTrue(isinstance(target, Friendship))
 
-    @tape.use_cassette('testfriendsids.yaml', serializer='yaml')
-    def testfriendsids(self):
-        self.api.friends_ids(screen_name=username)
+    @tape.use_cassette('testgetfriendids.yaml', serializer='yaml')
+    def testgetfriendids(self):
+        self.api.get_friend_ids(screen_name=username)
 
     @tape.use_cassette('testgetfollowerids.yaml', serializer='yaml')
     def testgetfollowerids(self):
index c0186530cba064da883b49739610e5bad6cda3ee..5e2f9ba09aa9cb2d3a61fa1905efa5c36e703391 100644 (file)
@@ -15,7 +15,7 @@ class TweepyCursorTests(TweepyTestCase):
 
     @tape.use_cassette('testcursorcursoritems.yaml', serializer='yaml')
     def testcursorcursoritems(self):
-        items = list(Cursor(self.api.friends_ids).items(2))
+        items = list(Cursor(self.api.get_friend_ids).items(2))
         self.assertEqual(len(items), 2)
 
         items = list(Cursor(self.api.get_follower_ids, screen_name=username).items(1))
@@ -23,7 +23,7 @@ class TweepyCursorTests(TweepyTestCase):
 
     @tape.use_cassette('testcursorcursorpages.yaml', serializer='yaml')
     def testcursorcursorpages(self):
-        pages = list(Cursor(self.api.friends_ids).pages(1))
+        pages = list(Cursor(self.api.get_friend_ids).pages(1))
         self.assertTrue(len(pages) == 1)
 
         pages = list(Cursor(self.api.get_follower_ids, screen_name=username).pages(1))
@@ -31,7 +31,7 @@ class TweepyCursorTests(TweepyTestCase):
 
     @tape.use_cassette('testcursorsetstartcursor.json')
     def testcursorsetstartcursor(self):
-        c = Cursor(self.api.friends_ids, cursor=123456)
+        c = Cursor(self.api.get_friend_ids, cursor=123456)
         self.assertEqual(c.iterator.next_cursor, 123456)
         self.assertFalse('cursor' in c.iterator.kwargs)
 
index afce01e18ce21f23b51f8650e49e6a4c67e19a17..f614bad40c71843af9a86f50ccb0e98848811e8e 100644 (file)
@@ -2097,8 +2097,9 @@ class API:
 
     @pagination(mode='cursor')
     @payload('ids')
-    def friends_ids(self, **kwargs):
-        """friends_ids(*, user_id, screen_name, cursor, stringify_ids, count)
+    def get_friend_ids(self, **kwargs):
+        """get_friend_ids(*, user_id, screen_name, cursor, stringify_ids, \
+                          count)
 
         Returns an array containing the IDs of users being followed by the
         specified user.