From: Harmon Date: Thu, 3 Jun 2021 11:50:07 +0000 (-0500) Subject: Rename API.favorites to API.get_favorites X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=3c467da810f8ffdf5d7d05244d586897ed1ed547;p=tweepy.git Rename API.favorites to API.get_favorites --- diff --git a/cassettes/testfavorites.json b/cassettes/testgetfavorites.json similarity index 100% rename from cassettes/testfavorites.json rename to cassettes/testgetfavorites.json diff --git a/docs/api.rst b/docs/api.rst index f0072a5..15157fe 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -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 diff --git a/tests/test_api.py b/tests/test_api.py index 20e2f2a..1662010 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -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): diff --git a/tweepy/api.py b/tweepy/api.py index 7742abe..012b2be 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -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