Fix blocks for v1.1.
authorJoshua Roesslein <jroesslein@gmail.com>
Sun, 20 Jan 2013 21:44:00 +0000 (13:44 -0800)
committerJoshua Roesslein <jroesslein@gmail.com>
Sun, 20 Jan 2013 21:44:00 +0000 (13:44 -0800)
Removed exists_block which is no longer an API endpoint.

tests.py
tweepy/api.py

index c1957e94f403856b5edd0629a1191417ba62dc60..57b4446f597a506ff5c68c1b1fecbe860baefbb1 100644 (file)
--- 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):
index 869d488233e5552f7e799570dc963c195536b222..2ffd21b647b413f4d6c9b9bbc63eb294991524c8 100644 (file)
@@ -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
     )