From: Harmon Date: Fri, 28 May 2021 12:42:03 +0000 (-0500) Subject: Rename API.list_subscribers to API.get_list_subscribers X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a05b630973d4ac7e642f827f03ce01bc8e5b9ef8;p=tweepy.git Rename API.list_subscribers to API.get_list_subscribers --- diff --git a/cassettes/testlistsubscribers.json b/cassettes/testgetlistsubscribers.json similarity index 100% rename from cassettes/testlistsubscribers.json rename to cassettes/testgetlistsubscribers.json diff --git a/docs/api.rst b/docs/api.rst index a1c1ec7..3037325 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -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 diff --git a/tests/test_api.py b/tests/test_api.py index 57e6fd8..ff20b90 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -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): diff --git a/tweepy/api.py b/tweepy/api.py index 840b1a1..563d5e2 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -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. diff --git a/tweepy/models.py b/tweepy/models.py index 9ee3f34..5b9c5e9 100644 --- a/tweepy/models.py +++ b/tweepy/models.py @@ -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 )