From 458e0e8275693bb557f2a21e1f75be92adae0d00 Mon Sep 17 00:00:00 2001 From: Harmon Date: Fri, 28 May 2021 06:47:34 -0500 Subject: [PATCH] Rename API.lists_all to API.get_lists --- cassettes/{testlistsall.json => testgetlists.json} | 0 docs/api.rst | 4 ++-- tests/test_api.py | 6 +++--- tweepy/api.py | 4 ++-- tweepy/models.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) rename cassettes/{testlistsall.json => testgetlists.json} (100%) diff --git a/cassettes/testlistsall.json b/cassettes/testgetlists.json similarity index 100% rename from cassettes/testlistsall.json rename to cassettes/testgetlists.json diff --git a/docs/api.rst b/docs/api.rst index 4f98bc05e..2432fcb61 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -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` | +------------------------------------------+-------------------------------------+ @@ -429,7 +429,7 @@ Accounts and users Create and manage lists ----------------------- -.. automethod:: API.lists_all +.. automethod:: API.get_lists .. automethod:: API.list_members diff --git a/tests/test_api.py b/tests/test_api.py index 193a894ab..b9004112f 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -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): diff --git a/tweepy/api.py b/tweepy/api.py index 0995bd8c3..ae78967df 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -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 diff --git a/tweepy/models.py b/tweepy/models.py index a7ab0e760..0bee8bdb8 100644 --- a/tweepy/models.py +++ b/tweepy/models.py @@ -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)