Rename API.list_subscribers to API.get_list_subscribers
authorHarmon <Harmon758@gmail.com>
Fri, 28 May 2021 12:42:03 +0000 (07:42 -0500)
committerHarmon <Harmon758@gmail.com>
Fri, 28 May 2021 12:42:03 +0000 (07:42 -0500)
cassettes/testgetlistsubscribers.json [moved from cassettes/testlistsubscribers.json with 100% similarity]
docs/api.rst
tests/test_api.py
tweepy/api.py
tweepy/models.py

index a1c1ec7ff68c096f5538696d4c748ee0a1d7b49f..303732580ab01ddb85ca22a694b95bde1501336c 100644 (file)
@@ -84,7 +84,7 @@
     +------------------------------------------+-------------------------------------+
     | `GET lists/statuses`_                    | :meth:`API.list_timeline`           |
     +------------------------------------------+-------------------------------------+
-    | `GET lists/subscribers`_                 | :meth:`API.list_subscribers`        |
+    | `GET lists/subscribers`_                 | :meth:`API.get_list_subscribers`    |
     +------------------------------------------+-------------------------------------+
     | `GET lists/subscribers/show`_            | :meth:`API.get_list_subscriber`     |
     +------------------------------------------+-------------------------------------+
@@ -443,7 +443,7 @@ Create and manage lists
 
 .. automethod:: API.list_timeline
 
-.. automethod:: API.list_subscribers
+.. automethod:: API.get_list_subscribers
 
 .. automethod:: API.get_list_subscriber
 
index 57e6fd890b553177eb454fa69cebec5f9cee343a..ff20b90e10673e0ad8f8e6d35599cd823b047616 100644 (file)
@@ -340,9 +340,9 @@ class TweepyAPITests(TweepyTestCase):
         self.api.subscribe_list(**params)
         self.api.unsubscribe_list(**params)
 
-    @tape.use_cassette('testlistsubscribers.json')
-    def testlistsubscribers(self):
-        self.api.list_subscribers(owner_screen_name='Twitter', slug='Official-Twitter-Accounts')
+    @tape.use_cassette('testgetlistsubscribers.json')
+    def testgetlistsubscribers(self):
+        self.api.get_list_subscribers(owner_screen_name='Twitter', slug='Official-Twitter-Accounts')
 
     @tape.use_cassette('testgetlistsubscriber.json')
     def testgetlistsubscriber(self):
index 840b1a1dd1f8b2557ab3a01702f1f0e9a9f9f265..563d5e285c40ca7908d8edd0ad8bb5ff32fd0d34 100644 (file)
@@ -1562,9 +1562,11 @@ class API:
 
     @pagination(mode='cursor')
     @payload('user', list=True)
-    def list_subscribers(self, **kwargs):
-        """list_subscribers(*, list_id, slug, owner_screen_name, owner_id, \
-                            count, cursor, include_entities, skip_status)
+    def get_list_subscribers(self, **kwargs):
+        """get_list_subscribers( \
+            *, list_id, slug, owner_screen_name, owner_id, count, cursor, \
+            include_entities, skip_status \
+        )
 
         Returns the subscribers of the specified list. Private list subscribers
         will only be shown if the authenticated user owns the specified list.
index 9ee3f34e902ff6837f9fd01f7205c46df45f2a12..5b9c5e9675118362e27fc91db44c4942679cfe17 100644 (file)
@@ -221,7 +221,7 @@ class List(Model):
         return self._api.unsubscribe_list(self.user.screen_name, self.slug)
 
     def subscribers(self, **kwargs):
-        return self._api.list_subscribers(
+        return self._api.get_list_subscribers(
             self.user.screen_name, self.slug, **kwargs
         )