Rename API.favorites to API.get_favorites
authorHarmon <Harmon758@gmail.com>
Thu, 3 Jun 2021 11:50:07 +0000 (06:50 -0500)
committerHarmon <Harmon758@gmail.com>
Thu, 3 Jun 2021 11:50:07 +0000 (06:50 -0500)
cassettes/testgetfavorites.json [moved from cassettes/testfavorites.json with 100% similarity]
docs/api.rst
tests/test_api.py
tweepy/api.py

index f0072a59cfe9fbe6ec8fce3c3ac8424b2a984395..15157fee3cfc82b35ca77543618c90640fc1290f 100644 (file)
@@ -34,7 +34,7 @@
     +------------------------------------------+--------------------------------------+
     | .. centered:: |Post, retrieve, and engage with Tweets|_                         |
     +------------------------------------------+--------------------------------------+
-    | `GET favorites/list`_                    | :meth:`API.favorites`                |
+    | `GET favorites/list`_                    | :meth:`API.get_favorites`            |
     +------------------------------------------+--------------------------------------+
     | `GET statuses/lookup`_                   | :meth:`API.lookup_statuses`          |
     +------------------------------------------+--------------------------------------+
@@ -390,7 +390,7 @@ Get Tweet timelines
 Post, retrieve, and engage with Tweets
 --------------------------------------
 
-.. automethod:: API.favorites
+.. automethod:: API.get_favorites
 
 .. automethod:: API.lookup_statuses
 
index 20e2f2ad1078603bbc4664045ceb73e039585f53..16620106cd3fc63c31aaf0c5759d16d0fa2fc10a 100644 (file)
@@ -237,9 +237,9 @@ class TweepyAPITests(TweepyTestCase):
             if k == 'email': continue
             self.assertEqual(getattr(updated, k), v)
 
-    @tape.use_cassette('testfavorites.json')
-    def testfavorites(self):
-        self.api.favorites()
+    @tape.use_cassette('testgetfavorites.json')
+    def testgetfavorites(self):
+        self.api.get_favorites()
 
     @tape.use_cassette('testcreatedestroyfavorite.json')
     def testcreatedestroyfavorite(self):
index 7742abeac28119869df2189f5199c7611c91a994..012b2be163ca28b6a15cf001141817ea7dc2bcc8 100644 (file)
@@ -579,8 +579,8 @@ class API:
 
     @pagination(mode='id')
     @payload('status', list=True)
-    def favorites(self, **kwargs):
-        """favorites(*, user_id, screen_name, count, since_id, max_id, \
+    def get_favorites(self, **kwargs):
+        """get_favorites(*, user_id, screen_name, count, since_id, max_id, \
                      include_entities)
 
         Returns the favorite statuses for the authenticating user or user