Skip to content

Commit b2acaae

Browse files
committed
Fix blocks for v1.1.
Removed exists_block which is no longer an API endpoint.
1 parent b144a8e commit b2acaae

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

tests.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,7 @@ def testenabledisablenotifications(self):
238238

239239
def testcreatedestroyblock(self):
240240
self.api.create_block('twitter')
241-
self.assertEqual(self.api.exists_block('twitter'), True)
242241
self.api.destroy_block('twitter')
243-
self.assertEqual(self.api.exists_block('twitter'), False)
244242
self.api.create_friendship('twitter') # restore
245243

246244
def testblocks(self):

tweepy/api.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -484,29 +484,17 @@ def update_profile_background_image(self, filename, *args, **kargs):
484484
require_auth = True
485485
)
486486

487-
""" blocks/exists """
488-
def exists_block(self, *args, **kargs):
489-
try:
490-
bind_api(
491-
path = '/blocks/exists.json',
492-
allowed_param = ['id', 'user_id', 'screen_name'],
493-
require_auth = True
494-
)(self, *args, **kargs)
495-
except TweepError:
496-
return False
497-
return True
498-
499487
""" blocks/blocking """
500488
blocks = bind_api(
501-
path = '/blocks/blocking.json',
489+
path = '/blocks/list.json',
502490
payload_type = 'user', payload_list = True,
503491
allowed_param = ['page'],
504492
require_auth = True
505493
)
506494

507495
""" blocks/blocking/ids """
508496
blocks_ids = bind_api(
509-
path = '/blocks/blocking/ids.json',
497+
path = '/blocks/ids.json',
510498
payload_type = 'json',
511499
require_auth = True
512500
)

0 commit comments

Comments
 (0)