From b2acaae07901dcadb81c435a9d3d8965478e0505 Mon Sep 17 00:00:00 2001 From: Joshua Roesslein Date: Sun, 20 Jan 2013 13:44:00 -0800 Subject: [PATCH] Fix blocks for v1.1. Removed exists_block which is no longer an API endpoint. --- tests.py | 2 -- tweepy/api.py | 16 ++-------------- 2 files changed, 2 insertions(+), 16 deletions(-) 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 ) -- 2.25.1