Rename API.retweets to API.get_retweets
authorHarmon <Harmon758@gmail.com>
Wed, 9 Jun 2021 05:43:19 +0000 (00:43 -0500)
committerHarmon <Harmon758@gmail.com>
Wed, 9 Jun 2021 05:43:19 +0000 (00:43 -0500)
cassettes/testgetretweets.json [moved from cassettes/testretweets.json with 100% similarity]
docs/api.rst
tests/test_api.py
tweepy/api.py
tweepy/models.py

index 3e29e366efc31f1fa4927b632eaadd24252d105d..d925d4cd42cef33aa850bfcee5f41d4ffb27b624 100644 (file)
@@ -42,7 +42,7 @@
     +------------------------------------------+--------------------------------------+
     | `GET statuses/retweeters/ids`_           | :meth:`API.get_retweeter_ids`        |
     +------------------------------------------+--------------------------------------+
-    | `GET statuses/retweets/:id`_             | :meth:`API.retweets`                 |
+    | `GET statuses/retweets/:id`_             | :meth:`API.get_retweets`             |
     +------------------------------------------+--------------------------------------+
     | `GET statuses/retweets_of_me`_           | :meth:`API.retweets_of_me`           |
     +------------------------------------------+--------------------------------------+
@@ -398,7 +398,7 @@ Post, retrieve, and engage with Tweets
 
 .. automethod:: API.get_retweeter_ids
 
-.. automethod:: API.retweets
+.. automethod:: API.get_retweets
 
 .. automethod:: API.retweets_of_me
 
index 60bdb82bb1d39e7c20cb0ea109ace84b95f95242..6ef1b8ff1d3c0dad94b56a7cb80d4f5a5188cdee 100644 (file)
@@ -63,9 +63,9 @@ class TweepyAPITests(TweepyTestCase):
         self.api.retweet(test_tweet_id)
         self.api.unretweet(test_tweet_id)
 
-    @tape.use_cassette('testretweets.json')
-    def testretweets(self):
-        self.api.retweets(test_tweet_id)
+    @tape.use_cassette('testgetretweets.json')
+    def testgetretweets(self):
+        self.api.get_retweets(test_tweet_id)
 
     @tape.use_cassette('testgetretweeterids.json')
     def testgetretweeterids(self):
index 8dc294413ce0ff1d6485f60d4a01652929429905..d1476f053bd9c6bc1fda2886f61bf5bb8481f13d 100644 (file)
@@ -778,8 +778,8 @@ class API:
         )
 
     @payload('status', list=True)
-    def retweets(self, id, **kwargs):
-        """retweets(id, *, count, trim_user)
+    def get_retweets(self, id, **kwargs):
+        """get_retweets(id, *, count, trim_user)
 
         Returns up to 100 of the first Retweets of the given Tweet.
 
index 73758c0a19df2ab903edeb15b28c2d6a0a07d2c3..c77000dc6d7981b9ba129268b8981c04ec5d0949 100644 (file)
@@ -369,7 +369,7 @@ class Status(Model, HashableID):
         return self._api.retweet(self.id)
 
     def retweets(self):
-        return self._api.retweets(self.id)
+        return self._api.get_retweets(self.id)
 
     def favorite(self):
         return self._api.create_favorite(self.id)