Rename API.followers to API.get_followers
authorHarmon <Harmon758@gmail.com>
Thu, 3 Jun 2021 12:00:17 +0000 (07:00 -0500)
committerHarmon <Harmon758@gmail.com>
Thu, 3 Jun 2021 12:00:17 +0000 (07:00 -0500)
cassettes/testgetfollowers.yaml [moved from cassettes/testfollowers.yaml with 100% similarity]
docs/api.rst
docs/pagination.rst
tests/test_api.py
tweepy/api.py
tweepy/models.py

index 15157fee3cfc82b35ca77543618c90640fc1290f..7bb1971645f9df34047c0dbe76a947220a4d8c31 100644 (file)
     +------------------------------------------+--------------------------------------+
     | `GET followers/ids`_                     | :meth:`API.followers_ids`            |
     +------------------------------------------+--------------------------------------+
-    | `GET followers/list`_                    | :meth:`API.followers`                |
+    | `GET followers/list`_                    | :meth:`API.get_followers`            |
     +------------------------------------------+--------------------------------------+
     | `GET friends/ids`_                       | :meth:`API.friends_ids`              |
     +------------------------------------------+--------------------------------------+
@@ -472,7 +472,7 @@ Follow, search, and get users
 
 .. automethod:: API.followers_ids
 
-.. automethod:: API.followers
+.. automethod:: API.get_followers
 
 .. automethod:: API.friends_ids
 
index f752ace60f9f9e6bf9eb34bf78e35bae9a204832..936f9747a8399979b921c2f04c0ffdef81e58c4d 100644 (file)
@@ -26,7 +26,7 @@ Example
                                 count=100).items(250):
         print(status.id)
 
-    for page in tweepy.Cursor(api.followers, screen_name="TwitterDev",
+    for page in tweepy.Cursor(api.get_followers, screen_name="TwitterDev",
                               count=200).pages(5):
         print(len(page))
 
index 16620106cd3fc63c31aaf0c5759d16d0fa2fc10a..596575933d1eeb31ab7c4a10e2370f090f73f61e 100644 (file)
@@ -174,9 +174,9 @@ class TweepyAPITests(TweepyTestCase):
     def testfriends(self):
         self.api.friends(screen_name=username)
 
-    @tape.use_cassette('testfollowers.yaml', serializer='yaml')
-    def testfollowers(self):
-        self.api.followers(screen_name=username)
+    @tape.use_cassette('testgetfollowers.yaml', serializer='yaml')
+    def testgetfollowers(self):
+        self.api.get_followers(screen_name=username)
 
     @tape.use_cassette('testverifycredentials.json')
     def testverifycredentials(self):
index cfcd37972ec4aeef041d122515c1c9188e0aca54..576bb6e347f9c7549dd7574ecf1d9989a7ae45a9 100644 (file)
@@ -2056,9 +2056,9 @@ class API:
 
     @pagination(mode='cursor')
     @payload('user', list=True)
-    def followers(self, **kwargs):
-        """followers(*, user_id, screen_name, cursor, count, skip_status, \
-                     include_user_entities)
+    def get_followers(self, **kwargs):
+        """get_followers(*, user_id, screen_name, cursor, count, skip_status, \
+                         include_user_entities)
 
         Returns a user's followers ordered in which they were added. If no user
         is specified by id/screen name, it defaults to the authenticated user.
index 3c1fd1030b1c0add48562993923764adc857831e..cbff9baa716d54dbd43271015c1e241dc6b6b69b 100644 (file)
@@ -415,7 +415,7 @@ class User(Model, HashableID):
         return self._api.friends(user_id=self.id, **kwargs)
 
     def followers(self, **kwargs):
-        return self._api.followers(user_id=self.id, **kwargs)
+        return self._api.get_followers(user_id=self.id, **kwargs)
 
     def follow(self):
         self._api.create_friendship(user_id=self.id)