Class: Kaltura::KalturaGroupUserService

Inherits:
KalturaServiceBase show all
Defined in:
lib/kaltura_client.rb

Overview

Add & Manage GroupUser

Instance Attribute Summary

Attributes inherited from KalturaServiceBase

#client

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ KalturaGroupUserService

Returns a new instance of KalturaGroupUserService.



2114
2115
2116
# File 'lib/kaltura_client.rb', line 2114

def initialize(client)
	super(client)
end

Instance Method Details

#add(group_user) ⇒ KalturaGroupUser

Add new GroupUser

Returns:



2120
2121
2122
2123
2124
2125
2126
2127
2128
# File 'lib/kaltura_client.rb', line 2120

def add(group_user)
	kparams = {}
	client.add_param(kparams, 'groupUser', group_user)
	client.queue_service_action_call('groupuser', 'add', 'KalturaGroupUser', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#delete(user_id, group_id) ⇒ Object

delete by userId and groupId

Returns:



2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
# File 'lib/kaltura_client.rb', line 2132

def delete(user_id, group_id)
	kparams = {}
	client.add_param(kparams, 'userId', user_id)
	client.add_param(kparams, 'groupId', group_id)
	client.queue_service_action_call('groupuser', 'delete', '', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#list(filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ KalturaGroupUserListResponse

List all GroupUsers



2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
# File 'lib/kaltura_client.rb', line 2145

def list(filter=KalturaNotImplemented, pager=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'filter', filter)
	client.add_param(kparams, 'pager', pager)
	client.queue_service_action_call('groupuser', 'list', 'KalturaGroupUserListResponse', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#sync(user_id, group_ids = KalturaNotImplemented, remove_from_existing_groups = true, create_new_groups = true) ⇒ KalturaBulkUpload

sync by userId and groupIds

Returns:



2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
# File 'lib/kaltura_client.rb', line 2158

def sync(user_id, group_ids=KalturaNotImplemented, remove_from_existing_groups=true, create_new_groups=true)
	kparams = {}
	client.add_param(kparams, 'userId', user_id)
	client.add_param(kparams, 'groupIds', group_ids)
	client.add_param(kparams, 'removeFromExistingGroups', remove_from_existing_groups)
	client.add_param(kparams, 'createNewGroups', create_new_groups)
	client.queue_service_action_call('groupuser', 'sync', 'KalturaBulkUpload', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#update(group_user_id, group_user) ⇒ KalturaGroupUser

update GroupUser

Returns:



2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
# File 'lib/kaltura_client.rb', line 2173

def update(group_user_id, group_user)
	kparams = {}
	client.add_param(kparams, 'groupUserId', group_user_id)
	client.add_param(kparams, 'groupUser', group_user)
	client.queue_service_action_call('groupuser', 'update', 'KalturaGroupUser', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end