From: Harmon Date: Fri, 28 May 2021 12:00:45 +0000 (-0500) Subject: Rename API.list_members to API.get_list_members X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=5845f023b74b309aa12c50844bdd586bd3e30dde;p=tweepy.git Rename API.list_members to API.get_list_members --- diff --git a/cassettes/testlistmembers.json b/cassettes/testgetlistmembers.json similarity index 100% rename from cassettes/testlistmembers.json rename to cassettes/testgetlistmembers.json diff --git a/docs/api.rst b/docs/api.rst index 2432fcb..94ac253 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -72,7 +72,7 @@ +------------------------------------------+-------------------------------------+ | `GET lists/list`_ | :meth:`API.get_lists` | +------------------------------------------+-------------------------------------+ - | `GET lists/members`_ | :meth:`API.list_members` | + | `GET lists/members`_ | :meth:`API.get_list_members` | +------------------------------------------+-------------------------------------+ | `GET lists/members/show`_ | :meth:`API.get_list_member` | +------------------------------------------+-------------------------------------+ @@ -431,7 +431,7 @@ Create and manage lists .. automethod:: API.get_lists -.. automethod:: API.list_members +.. automethod:: API.get_list_members .. automethod:: API.get_list_member diff --git a/tests/test_api.py b/tests/test_api.py index b900411..9d10433 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -323,9 +323,9 @@ class TweepyAPITests(TweepyTestCase): assert_list(self.api.add_list_members(**params)) assert_list(self.api.remove_list_members(**params)) - @tape.use_cassette('testlistmembers.json') - def testlistmembers(self): - self.api.list_members(owner_screen_name='Twitter', slug='Official-Twitter-Accounts') + @tape.use_cassette('testgetlistmembers.json') + def testgetlistmembers(self): + self.api.get_list_members(owner_screen_name='Twitter', slug='Official-Twitter-Accounts') @tape.use_cassette('testgetlistmember.json') def testgetlistmember(self): diff --git a/tweepy/api.py b/tweepy/api.py index ae78967..f1d859c 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -1313,9 +1313,9 @@ class API: @pagination(mode='cursor') @payload('user', list=True) - def list_members(self, **kwargs): - """list_members(*, list_id, slug, owner_screen_name, owner_id, count, \ - cursor, include_entities, skip_status) + def get_list_members(self, **kwargs): + """get_list_members(*, list_id, slug, owner_screen_name, owner_id, \ + count, cursor, include_entities, skip_status) Returns the members of the specified list. diff --git a/tweepy/models.py b/tweepy/models.py index 0bee8bd..465e89f 100644 --- a/tweepy/models.py +++ b/tweepy/models.py @@ -207,7 +207,7 @@ class List(Model): return self._api.remove_list_member(self.slug, id) def members(self, **kwargs): - return self._api.list_members( + return self._api.get_list_members( self.user.screen_name, self.slug, **kwargs )