Rename API.lists_ownerships to API.get_list_ownerships
authorHarmon <Harmon758@gmail.com>
Fri, 28 May 2021 12:32:55 +0000 (07:32 -0500)
committerHarmon <Harmon758@gmail.com>
Fri, 28 May 2021 12:32:55 +0000 (07:32 -0500)
Rename models.User.lists_ownerships to models.User.list_ownerships

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

index 04ef79cefa9f7347b6f7eae52a4799476796a150..a1c1ec7ff68c096f5538696d4c748ee0a1d7b49f 100644 (file)
@@ -78,7 +78,7 @@
     +------------------------------------------+-------------------------------------+
     | `GET lists/memberships`_                 | :meth:`API.get_list_memberships`    |
     +------------------------------------------+-------------------------------------+
-    | `GET lists/ownerships`_                  | :meth:`API.lists_ownerships`        |
+    | `GET lists/ownerships`_                  | :meth:`API.get_list_ownerships`     |
     +------------------------------------------+-------------------------------------+
     | `GET lists/show`_                        | :meth:`API.get_list`                |
     +------------------------------------------+-------------------------------------+
@@ -437,7 +437,7 @@ Create and manage lists
 
 .. automethod:: API.get_list_memberships
 
-.. automethod:: API.lists_ownerships
+.. automethod:: API.get_list_ownerships
 
 .. automethod:: API.get_list
 
index be45dc8753fa51cbb27698466071d1a8f791ee68..57e6fd890b553177eb454fa69cebec5f9cee343a 100644 (file)
@@ -279,9 +279,9 @@ class TweepyAPITests(TweepyTestCase):
     def testgetlistmemberships(self):
         self.api.get_list_memberships()
 
-    @tape.use_cassette('testlistsownerships.json')
-    def testlistsownerships(self):
-        self.api.lists_ownerships()
+    @tape.use_cassette('testgetlistownerships.json')
+    def testgetlistownerships(self):
+        self.api.get_list_ownerships()
 
     @tape.use_cassette('testlistssubscriptions.json')
     def testlistssubscriptions(self):
index e51319d2d277d2f94b44183b862696400fad334d..840b1a1dd1f8b2557ab3a01702f1f0e9a9f9f265 100644 (file)
@@ -1444,8 +1444,8 @@ class API:
 
     @pagination(mode='cursor')
     @payload('list', list=True)
-    def lists_ownerships(self, **kwargs):
-        """lists_ownerships(*, user_id, screen_name, count, cursor)
+    def get_list_ownerships(self, **kwargs):
+        """get_list_ownerships(*, user_id, screen_name, count, cursor)
 
         Returns the lists owned by the specified user. Private lists will only
         be shown if the authenticated user is also the owner of the lists. If
index 93fa9115098b6216a36e73bd218e9ec8fc85dab8..9ee3f34e902ff6837f9fd01f7205c46df45f2a12 100644 (file)
@@ -436,8 +436,8 @@ class User(Model, HashableID):
     def list_memberships(self, *args, **kwargs):
         return self._api.get_list_memberships(user_id=self.id, *args, **kwargs)
 
-    def lists_ownerships(self, *args, **kwargs):
-        return self._api.lists_ownerships(user_id=self.id, *args, **kwargs)
+    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)