From: Joshua Roesslein Date: Sun, 20 Jan 2013 21:44:00 +0000 (-0800) Subject: Fix blocks for v1.1. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b2acaae07901dcadb81c435a9d3d8965478e0505;p=tweepy.git Fix blocks for v1.1. Removed exists_block which is no longer an API endpoint. --- diff --git a/tests.py b/tests.py index c1957e9..57b4446 100644 --- a/tests.py +++ b/tests.py @@ -238,9 +238,7 @@ class TweepyAPITests(unittest.TestCase): def testcreatedestroyblock(self): self.api.create_block('twitter') - self.assertEqual(self.api.exists_block('twitter'), True) self.api.destroy_block('twitter') - self.assertEqual(self.api.exists_block('twitter'), False) self.api.create_friendship('twitter') # restore def testblocks(self): diff --git a/tweepy/api.py b/tweepy/api.py index 869d488..2ffd21b 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -484,21 +484,9 @@ class API(object): require_auth = True ) - """ blocks/exists """ - def exists_block(self, *args, **kargs): - try: - bind_api( - path = '/blocks/exists.json', - allowed_param = ['id', 'user_id', 'screen_name'], - require_auth = True - )(self, *args, **kargs) - except TweepError: - return False - return True - """ blocks/blocking """ blocks = bind_api( - path = '/blocks/blocking.json', + path = '/blocks/list.json', payload_type = 'user', payload_list = True, allowed_param = ['page'], require_auth = True @@ -506,7 +494,7 @@ class API(object): """ blocks/blocking/ids """ blocks_ids = bind_api( - path = '/blocks/blocking/ids.json', + path = '/blocks/ids.json', payload_type = 'json', require_auth = True )