Commit 3cfd9209 authored by kk6's avatar kk6
Browse files

Fixed user_ids and screen_names argument of the new method to receive a list.

parent 4b87301e
......@@ -281,7 +281,7 @@ class TweepyAPITests(unittest.TestCase):
params = {
'slug': 'test',
'owner_screen_name': username,
'screen_name': 'twitterapi,twittermobile'
'screen_names': ['twitterapi', 'twittermobile']
}
def assert_list(l):
......
......@@ -574,19 +574,35 @@ class API(object):
require_auth = True
)
add_list_members = bind_api(
""" Perform bulk add of list members from user ID or screenname """
def add_list_members(self, screen_names=None, user_ids=None, slug=None,
list_id=None, owner_id=None, owner_screen_name=None):
return self._add_list_members(list_to_csv(screen_names),
list_to_csv(user_ids),
slug, list_id, owner_id,
owner_screen_name)
_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'],
allowed_param = ['screen_name', 'user_id', 'slug', 'lit_id', 'owner_id', 'owner_screen_name'],
require_auth = True
)
remove_list_members = bind_api(
""" Perform bulk remove of list members from user ID or screenname """
def remove_list_members(self, screen_names=None, user_ids=None, slug=None,
list_id=None, owner_id=None, owner_screen_name=None):
return self._remove_list_members(list_to_csv(screen_names),
list_to_csv(user_ids),
slug, list_id, owner_id,
owner_screen_name)
_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'],
allowed_param = ['screen_name', 'user_id', 'slug', 'lit_id', 'owner_id', 'owner_screen_name'],
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