Commit b2acaae0 authored by Joshua Roesslein's avatar Joshua Roesslein
Browse files

Fix blocks for v1.1.

Removed exists_block which is no longer an API endpoint.
parent b144a8e6
......@@ -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):
......
......@@ -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
)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment