Commit 0c0c696c authored by kk6's avatar kk6
Browse files

added multiple list members operatio api methods

parent 4d7ba301
......@@ -280,6 +280,19 @@ class TweepyAPITests(TweepyTestCase):
sleep(3)
assert_list(self.api.remove_list_member(**params))
def testaddremovelistmembers(self):
params = {
'slug': 'test',
'owner_screen_name': username,
'screen_name': 'twitterapi,twittermobile'
}
def assert_list(l):
self.assertEqual(l.name, params['slug'])
assert_list(self.api.add_list_members(**params))
assert_list(self.api.remove_list_members(**params))
def testlistmembers(self):
self.api.list_members('applepie', 'stars')
......
......@@ -576,6 +576,22 @@ class API(object):
require_auth = True
)
add_list_members = bind_api(
path = '/lists/members/create_all.json',
method = 'POST',
payload_type = 'list',
allowed_param = ['screen_name', 'user_id', 'owner_screen_name', 'owner_id', 'slug', 'list_id'],
require_auth = True
)
remove_list_members = bind_api(
path = '/lists/members/destroy_all.json',
method = 'POST',
payload_type = 'list',
allowed_param = ['screen_name', 'user_id', 'owner_screen_name', 'owner_id', 'slug', 'list_id'],
require_auth = True
)
list_members = bind_api(
path = '/lists/members.json',
payload_type = 'user', payload_list = 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