+------------------------------------------+--------------------------------------+
| `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` |
+------------------------------------------+--------------------------------------+
.. automethod:: API.get_followers
-.. automethod:: API.friends_ids
+.. automethod:: API.get_friend_ids
.. automethod:: API.get_friends
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):
@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))
@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))
@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)
@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.