Skip to content

Commit

Permalink
Rename API.blocks to API.get_blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
Harmon758 committed Jun 3, 2021
1 parent bab3e5e commit 9541794
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions docs/api.rst
Expand Up @@ -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` |
+------------------------------------------+--------------------------------------+
Expand Down Expand Up @@ -532,7 +532,7 @@ Mute, block, and report users

.. automethod:: API.blocks_ids

.. automethod:: API.blocks
.. automethod:: API.get_blocks

.. automethod:: API.mutes_ids

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

@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.
Expand Down

0 comments on commit 9541794

Please sign in to comment.