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')
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,