Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Zahra Rajabi
tweepy
Commits
b2acaae0
Commit
b2acaae0
authored
Jan 20, 2013
by
Joshua Roesslein
Browse files
Fix blocks for v1.1.
Removed exists_block which is no longer an API endpoint.
parent
b144a8e6
Changes
2
Hide whitespace changes
Inline
Side-by-side
tests.py
View file @
b2acaae0
...
...
@@ -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
):
...
...
tweepy/api.py
View file @
b2acaae0
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment