Rename API.blocks to API.get_blocks
authorHarmon <Harmon758@gmail.com>
Thu, 3 Jun 2021 12:25:19 +0000 (07:25 -0500)
committerHarmon <Harmon758@gmail.com>
Thu, 3 Jun 2021 12:25:19 +0000 (07:25 -0500)
cassettes/testgetblocks.json [moved from cassettes/testblocks.json with 100% similarity]
docs/api.rst
tests/test_api.py
tweepy/api.py

index 2050be9374c80f410772b0d88089fb730069c82b..33ca71efbb2c667cbd8821cbadb166b89ab6ec2f 100644 (file)
     +------------------------------------------+--------------------------------------+
     | `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
 
index bb78ea1dacded8741a4c653849c113a24badd8eb..e82b4fb0e20a407af59d41333e65f624024bcd34 100644 (file)
@@ -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):
index f614bad40c71843af9a86f50ccb0e98848811e8e..aa0138d29b1f2fc517ee844d5ada8a174273eff8 100644 (file)
@@ -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.