Rename API.list_members to API.get_list_members
authorHarmon <Harmon758@gmail.com>
Fri, 28 May 2021 12:00:45 +0000 (07:00 -0500)
committerHarmon <Harmon758@gmail.com>
Fri, 28 May 2021 12:00:45 +0000 (07:00 -0500)
cassettes/testgetlistmembers.json [moved from cassettes/testlistmembers.json with 100% similarity]
docs/api.rst
tests/test_api.py
tweepy/api.py
tweepy/models.py

index 2432fcb610de3b2a308d9b08107734ee75b9ab63..94ac253a26b1abe9d57e84916fd0c3b7a8d5f365 100644 (file)
@@ -72,7 +72,7 @@
     +------------------------------------------+-------------------------------------+
     | `GET lists/list`_                        | :meth:`API.get_lists`               |
     +------------------------------------------+-------------------------------------+
-    | `GET lists/members`_                     | :meth:`API.list_members`            |
+    | `GET lists/members`_                     | :meth:`API.get_list_members`        |
     +------------------------------------------+-------------------------------------+
     | `GET lists/members/show`_                | :meth:`API.get_list_member`         |
     +------------------------------------------+-------------------------------------+
@@ -431,7 +431,7 @@ Create and manage lists
 
 .. automethod:: API.get_lists
 
-.. automethod:: API.list_members
+.. automethod:: API.get_list_members
 
 .. automethod:: API.get_list_member
 
index b9004112f202e83e716422bd4ef7cd72735848ba..9d104334a0221f5a126d5990819d3d8383bb4e8d 100644 (file)
@@ -323,9 +323,9 @@ class TweepyAPITests(TweepyTestCase):
         assert_list(self.api.add_list_members(**params))
         assert_list(self.api.remove_list_members(**params))
 
-    @tape.use_cassette('testlistmembers.json')
-    def testlistmembers(self):
-        self.api.list_members(owner_screen_name='Twitter', slug='Official-Twitter-Accounts')
+    @tape.use_cassette('testgetlistmembers.json')
+    def testgetlistmembers(self):
+        self.api.get_list_members(owner_screen_name='Twitter', slug='Official-Twitter-Accounts')
 
     @tape.use_cassette('testgetlistmember.json')
     def testgetlistmember(self):
index ae78967dfdc0634507dc3794e8f845c6a69882a0..f1d859c2107f85ad02cddefae7c4cd7685a5d1ed 100644 (file)
@@ -1313,9 +1313,9 @@ class API:
 
     @pagination(mode='cursor')
     @payload('user', list=True)
-    def list_members(self, **kwargs):
-        """list_members(*, list_id, slug, owner_screen_name, owner_id, count, \
-                        cursor, include_entities, skip_status)
+    def get_list_members(self, **kwargs):
+        """get_list_members(*, list_id, slug, owner_screen_name, owner_id, \
+                            count, cursor, include_entities, skip_status)
 
         Returns the members of the specified list.
 
index 0bee8bdb883061f075ec14e4b93fffde95d207ff..465e89f1ce6aa53e4266cdbae01166153cf08cad 100644 (file)
@@ -207,7 +207,7 @@ class List(Model):
         return self._api.remove_list_member(self.slug, id)
 
     def members(self, **kwargs):
-        return self._api.list_members(
+        return self._api.get_list_members(
             self.user.screen_name, self.slug, **kwargs
         )