Class: Kaltura::KalturaGroupService

Inherits:
KalturaServiceBase show all
Defined in:
lib/kaltura_plugins/kaltura_group_client_plugin.rb

Instance Attribute Summary

Attributes inherited from KalturaServiceBase

#client

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ KalturaGroupService

Returns a new instance of KalturaGroupService.



214
215
216
# File 'lib/kaltura_plugins/kaltura_group_client_plugin.rb', line 214

def initialize(client)
	super(client)
end

Instance Method Details

#add(group) ⇒ KalturaGroup

Adds a new group (user of type group).

Returns:



220
221
222
223
224
225
226
227
228
# File 'lib/kaltura_plugins/kaltura_group_client_plugin.rb', line 220

def add(group)
	kparams = {}
	client.add_param(kparams, 'group', group)
	client.queue_service_action_call('group_group', 'add', 'KalturaGroup', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#clone(original_group_id, new_group_id, new_group_name = KalturaNotImplemented) ⇒ KalturaGroup

clone the group (groupId), and set group id with the neeGroupName.

Returns:



232
233
234
235
236
237
238
239
240
241
242
# File 'lib/kaltura_plugins/kaltura_group_client_plugin.rb', line 232

def clone(original_group_id, new_group_id, new_group_name=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'originalGroupId', original_group_id)
	client.add_param(kparams, 'newGroupId', new_group_id)
	client.add_param(kparams, 'newGroupName', new_group_name)
	client.queue_service_action_call('group_group', 'clone', 'KalturaGroup', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#delete(group_id) ⇒ KalturaGroup

Delete group by ID

Returns:



246
247
248
249
250
251
252
253
254
# File 'lib/kaltura_plugins/kaltura_group_client_plugin.rb', line 246

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

#get(group_id) ⇒ KalturaGroup

Retrieves a group object for a specified group ID.

Returns:



258
259
260
261
262
263
264
265
266
# File 'lib/kaltura_plugins/kaltura_group_client_plugin.rb', line 258

def get(group_id)
	kparams = {}
	client.add_param(kparams, 'groupId', group_id)
	client.queue_service_action_call('group_group', 'get', 'KalturaGroup', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

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

Lists group objects that are associated with an account. Blocked users are listed unless you use a filter to exclude them. Deleted users are not listed unless you use a filter to include them.



272
273
274
275
276
277
278
279
280
281
# File 'lib/kaltura_plugins/kaltura_group_client_plugin.rb', line 272

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

#update(group_id, group) ⇒ KalturaGroup

Update group by ID

Returns:



285
286
287
288
289
290
291
292
293
294
# File 'lib/kaltura_plugins/kaltura_group_client_plugin.rb', line 285

def update(group_id, group)
	kparams = {}
	client.add_param(kparams, 'groupId', group_id)
	client.add_param(kparams, 'group', group)
	client.queue_service_action_call('group_group', 'update', 'KalturaGroup', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end