Skip to content

Commit

Permalink
Rename API.favorites to API.get_favorites
Browse files Browse the repository at this point in the history
  • Loading branch information
Harmon758 committed Jun 3, 2021
1 parent 1400065 commit 3c467da
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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` |
+------------------------------------------+--------------------------------------+
Expand Down Expand Up @@ -390,7 +390,7 @@ Get Tweet timelines
Post, retrieve, and engage with Tweets
--------------------------------------

.. automethod:: API.favorites
.. automethod:: API.get_favorites

.. automethod:: API.lookup_statuses

Expand Down
6 changes: 3 additions & 3 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,9 @@ def testupdateprofile(self):
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):
Expand Down
4 changes: 2 additions & 2 deletions tweepy/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,8 +579,8 @@ def user_timeline(self, **kwargs):

@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
Expand Down

0 comments on commit 3c467da

Please sign in to comment.