Skip to content

Commit

Permalink
Rename API.lists_subscriptions to API.get_list_subscriptions
Browse files Browse the repository at this point in the history
Rename models.User.lists_subscriptions to models.User.list_subscriptions
  • Loading branch information
Harmon758 committed May 28, 2021
1 parent a05b630 commit 51945a7
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions docs/api.rst
Expand Up @@ -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` |
+------------------------------------------+-------------------------------------+
Expand Down Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions tests/test_api.py
Expand Up @@ -283,9 +283,9 @@ def testgetlistmemberships(self):
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):
Expand Down
4 changes: 2 additions & 2 deletions tweepy/api.py
Expand Up @@ -1655,8 +1655,8 @@ def get_list_subscriber(self, **kwargs):

@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.
Expand Down
6 changes: 4 additions & 2 deletions tweepy/models.py
Expand Up @@ -439,8 +439,10 @@ def list_memberships(self, *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)
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)
Expand Down

0 comments on commit 51945a7

Please sign in to comment.