From: Harmon Date: Thu, 3 Jun 2021 12:25:19 +0000 (-0500) Subject: Rename API.blocks to API.get_blocks X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=9541794b5dd9a3617247c0cd5efdcd082b5e7275;p=tweepy.git Rename API.blocks to API.get_blocks --- diff --git a/cassettes/testblocks.json b/cassettes/testgetblocks.json similarity index 100% rename from cassettes/testblocks.json rename to cassettes/testgetblocks.json diff --git a/docs/api.rst b/docs/api.rst index 2050be9..33ca71e 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -170,7 +170,7 @@ +------------------------------------------+--------------------------------------+ | `GET blocks/ids`_ | :meth:`API.blocks_ids` | +------------------------------------------+--------------------------------------+ - | `GET blocks/list`_ | :meth:`API.blocks` | + | `GET blocks/list`_ | :meth:`API.get_blocks` | +------------------------------------------+--------------------------------------+ | `GET mutes/users/ids`_ | :meth:`API.mutes_ids` | +------------------------------------------+--------------------------------------+ @@ -532,7 +532,7 @@ Mute, block, and report users .. automethod:: API.blocks_ids -.. automethod:: API.blocks +.. automethod:: API.get_blocks .. automethod:: API.mutes_ids diff --git a/tests/test_api.py b/tests/test_api.py index bb78ea1..e82b4fb 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -252,9 +252,9 @@ class TweepyAPITests(TweepyTestCase): self.api.destroy_block(screen_name='twitter') self.api.create_friendship(screen_name='twitter') # restore - @tape.use_cassette('testblocks.json') - def testblocks(self): - self.api.blocks() + @tape.use_cassette('testgetblocks.json') + def testgetblocks(self): + self.api.get_blocks() @tape.use_cassette('testblocksids.json') def testblocksids(self): diff --git a/tweepy/api.py b/tweepy/api.py index f614bad..aa0138d 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -2914,8 +2914,8 @@ class API: @pagination(mode='cursor') @payload('user', list=True) - def blocks(self, **kwargs): - """blocks(*, include_entities, skip_status, cursor) + def get_blocks(self, **kwargs): + """get_blocks(*, include_entities, skip_status, cursor) Returns an array of user objects that the authenticating user is blocking.