From e241ca4bb44acc0def9db390ddf10cf7f9fc37e6 Mon Sep 17 00:00:00 2001 From: Harmon Date: Thu, 3 Jun 2021 07:29:37 -0500 Subject: [PATCH] Rename API.blocks_ids to API.get_blocked_ids --- cassettes/{testblocksids.json => testgetblockedids.json} | 0 docs/api.rst | 4 ++-- tests/test_api.py | 6 +++--- tweepy/api.py | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) rename cassettes/{testblocksids.json => testgetblockedids.json} (100%) diff --git a/cassettes/testblocksids.json b/cassettes/testgetblockedids.json similarity index 100% rename from cassettes/testblocksids.json rename to cassettes/testgetblockedids.json diff --git a/docs/api.rst b/docs/api.rst index 33ca71e..d1a02b9 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -168,7 +168,7 @@ +------------------------------------------+--------------------------------------+ | .. centered:: |Mute, block, and report users|_ | +------------------------------------------+--------------------------------------+ - | `GET blocks/ids`_ | :meth:`API.blocks_ids` | + | `GET blocks/ids`_ | :meth:`API.get_blocked_ids` | +------------------------------------------+--------------------------------------+ | `GET blocks/list`_ | :meth:`API.get_blocks` | +------------------------------------------+--------------------------------------+ @@ -530,7 +530,7 @@ Manage account settings and profile Mute, block, and report users ----------------------------- -.. automethod:: API.blocks_ids +.. automethod:: API.get_blocked_ids .. automethod:: API.get_blocks diff --git a/tests/test_api.py b/tests/test_api.py index e82b4fb..867ea81 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -256,9 +256,9 @@ class TweepyAPITests(TweepyTestCase): def testgetblocks(self): self.api.get_blocks() - @tape.use_cassette('testblocksids.json') - def testblocksids(self): - self.api.blocks_ids() + @tape.use_cassette('testgetblockedids.json') + def testgetblockedids(self): + self.api.get_blocked_ids() # TODO: Rewrite test to be less brittle. It fails way too often. # def testcreateupdatedestroylist(self): diff --git a/tweepy/api.py b/tweepy/api.py index aa0138d..e40324f 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -2885,8 +2885,8 @@ class API: @pagination(mode='cursor') @payload('ids') - def blocks_ids(self, **kwargs): - """blocks_ids(*, stringify_ids, cursor) + def get_blocked_ids(self, **kwargs): + """get_blocked_ids(*, stringify_ids, cursor) Returns an array of numeric user IDs the authenticating user is blocking. -- 2.25.1