Rename API.lists_subscriptions to API.get_list_subscriptions
authorHarmon <Harmon758@gmail.com>
Fri, 28 May 2021 12:48:00 +0000 (07:48 -0500)
committerHarmon <Harmon758@gmail.com>
Fri, 28 May 2021 12:48:00 +0000 (07:48 -0500)
Rename models.User.lists_subscriptions to models.User.list_subscriptions

cassettes/testgetlistsubscriptions.json [moved from cassettes/testlistssubscriptions.json with 100% similarity]
docs/api.rst
tests/test_api.py
tweepy/api.py
tweepy/models.py

index 303732580ab01ddb85ca22a694b95bde1501336c..50502ca23ce6aa8c948cb73c9ed2c0e98579f12c 100644 (file)
@@ -88,7 +88,7 @@
     +------------------------------------------+-------------------------------------+
     | `GET lists/subscribers/show`_            | :meth:`API.get_list_subscriber`     |
     +------------------------------------------+-------------------------------------+
-    | `GET lists/subscriptions`_               | :meth:`API.lists_subscriptions`     |
+    | `GET lists/subscriptions`_               | :meth:`API.get_list_subscriptions`  |
     +------------------------------------------+-------------------------------------+
     | `POST lists/create`_                     | :meth:`API.create_list`             |
     +------------------------------------------+-------------------------------------+
@@ -447,7 +447,7 @@ Create and manage lists
 
 .. automethod:: API.get_list_subscriber
 
-.. automethod:: API.lists_subscriptions
+.. automethod:: API.get_list_subscriptions
 
 .. automethod:: API.create_list
 
index ff20b90e10673e0ad8f8e6d35599cd823b047616..84671deae9aab233fce67efed08e248e9547c55b 100644 (file)
@@ -283,9 +283,9 @@ class TweepyAPITests(TweepyTestCase):
     def testgetlistownerships(self):
         self.api.get_list_ownerships()
 
-    @tape.use_cassette('testlistssubscriptions.json')
-    def testlistssubscriptions(self):
-        self.api.lists_subscriptions()
+    @tape.use_cassette('testgetlistsubscriptions.json')
+    def testgetlistsubscriptions(self):
+        self.api.get_list_subscriptions()
 
     @tape.use_cassette('testlisttimeline.json')
     def testlisttimeline(self):
index 563d5e285c40ca7908d8edd0ad8bb5ff32fd0d34..628237f7e48ff116fcd42bfcc82f3dca299008fc 100644 (file)
@@ -1655,8 +1655,8 @@ class API:
 
     @pagination(mode='cursor')
     @payload('list', list=True)
-    def lists_subscriptions(self, **kwargs):
-        """lists_subscriptions(*, user_id, screen_name, count, cursor)
+    def get_list_subscriptions(self, **kwargs):
+        """get_list_subscriptions(*, user_id, screen_name, count, cursor)
 
         Obtain a collection of the lists the specified user is subscribed to,
         20 lists per page by default. Does not include the user's own lists.
index 5b9c5e9675118362e27fc91db44c4942679cfe17..e166852c45ef00ace153b3a9369772da4cb4b813 100644 (file)
@@ -439,8 +439,10 @@ class User(Model, HashableID):
     def list_ownerships(self, *args, **kwargs):
         return self._api.get_list_ownerships(user_id=self.id, *args, **kwargs)
 
-    def lists_subscriptions(self, *args, **kwargs):
-        return self._api.lists_subscriptions(user_id=self.id, *args, **kwargs)
+    def list_subscriptions(self, *args, **kwargs):
+        return self._api.get_list_subscriptions(
+            user_id=self.id, *args, **kwargs
+        )
 
     def lists(self, *args, **kwargs):
         return self._api.get_lists(user_id=self.id, *args, **kwargs)