Rename API.lists_all to API.get_lists
authorHarmon <Harmon758@gmail.com>
Fri, 28 May 2021 11:47:34 +0000 (06:47 -0500)
committerHarmon <Harmon758@gmail.com>
Fri, 28 May 2021 11:47:34 +0000 (06:47 -0500)
cassettes/testgetlists.json [moved from cassettes/testlistsall.json with 100% similarity]
docs/api.rst
tests/test_api.py
tweepy/api.py
tweepy/models.py

index 4f98bc05e99a61902e3c71467aab6bbc6c28e5e8..2432fcb610de3b2a308d9b08107734ee75b9ab63 100644 (file)
@@ -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
 
index 193a894ab6d01284794f5ced442ac9f89d538702..b9004112f202e83e716422bd4ef7cd72735848ba 100644 (file)
@@ -271,9 +271,9 @@ class TweepyAPITests(TweepyTestCase):
     #     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):
index 0995bd8c31242c33d1181e7a1bf4cffc01203815..ae78967dfdc0634507dc3794e8f845c6a69882a0 100644 (file)
@@ -1271,8 +1271,8 @@ class API:
     # 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
index a7ab0e760e89fdeda1c15771a62f903becac47be..0bee8bdb883061f075ec14e4b93fffde95d207ff 100644 (file)
@@ -443,7 +443,7 @@ class User(Model, HashableID):
         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)