Skip to content

Commit

Permalink
Rename API.lists_all to API.get_lists
Browse files Browse the repository at this point in the history
  • Loading branch information
Harmon758 committed May 28, 2021
1 parent 6f4fb39 commit 458e0e8
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions docs/api.rst
Expand Up @@ -70,7 +70,7 @@
+------------------------------------------+-------------------------------------+
| .. centered:: |Create and manage lists|_ |
+------------------------------------------+-------------------------------------+
| `GET lists/list`_ | :meth:`API.lists_all` |
| `GET lists/list`_ | :meth:`API.get_lists` |
+------------------------------------------+-------------------------------------+
| `GET lists/members`_ | :meth:`API.list_members` |
+------------------------------------------+-------------------------------------+
Expand Down Expand Up @@ -429,7 +429,7 @@ Accounts and users
Create and manage lists
-----------------------

.. automethod:: API.lists_all
.. automethod:: API.get_lists

.. automethod:: API.list_members

Expand Down
6 changes: 3 additions & 3 deletions tests/test_api.py
Expand Up @@ -271,9 +271,9 @@ def testblocksids(self):
# self.assertEqual(l.description, 'updated!')
# self.api.destroy_list(list_id=l.id)

@tape.use_cassette('testlistsall.json')
def testlistsall(self):
self.api.lists_all()
@tape.use_cassette('testgetlists.json')
def testgetlists(self):
self.api.get_lists()

@tape.use_cassette('testlistsmemberships.json')
def testlistsmemberships(self):
Expand Down
4 changes: 2 additions & 2 deletions tweepy/api.py
Expand Up @@ -1271,8 +1271,8 @@ def search(self, q, **kwargs):
# Create and manage lists

@payload('list', list=True)
def lists_all(self, **kwargs):
"""lists_all(*, user_id, screen_name, reverse)
def get_lists(self, **kwargs):
"""get_lists(*, user_id, screen_name, reverse)
Returns all lists the authenticating or specified user subscribes to,
including their own. The user is specified using the ``user_id`` or
Expand Down
2 changes: 1 addition & 1 deletion tweepy/models.py
Expand Up @@ -443,7 +443,7 @@ def lists_subscriptions(self, *args, **kwargs):
return self._api.lists_subscriptions(user_id=self.id, *args, **kwargs)

def lists(self, *args, **kwargs):
return self._api.lists_all(user_id=self.id, *args, **kwargs)
return self._api.get_lists(user_id=self.id, *args, **kwargs)

def followers_ids(self, *args, **kwargs):
return self._api.followers_ids(user_id=self.id, *args, **kwargs)
Expand Down

0 comments on commit 458e0e8

Please sign in to comment.