Class: Kaltura::KalturaEventNotificationTemplateService

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

Overview

Event notification template service lets you create and manage event notification templates

Instance Attribute Summary

Attributes inherited from KalturaServiceBase

#client

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ KalturaEventNotificationTemplateService

Returns a new instance of KalturaEventNotificationTemplateService.



363
364
365
# File 'lib/kaltura_plugins/kaltura_event_notification_client_plugin.rb', line 363

def initialize(client)
	super(client)
end

Instance Method Details

#add(event_notification_template) ⇒ Object

This action allows for the creation of new backend event types in the system. This action requires access to the Kaltura server Admin Console. If you’re looking to register to existing event types, please use the clone action instead.



369
370
371
372
373
374
375
376
377
# File 'lib/kaltura_plugins/kaltura_event_notification_client_plugin.rb', line 369

def add(event_notification_template)
	kparams = {}
	client.add_param(kparams, 'eventNotificationTemplate', event_notification_template)
	client.queue_service_action_call('eventnotification_eventnotificationtemplate', 'add', 'KalturaEventNotificationTemplate', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#clone(id, event_notification_template = KalturaNotImplemented) ⇒ Object

This action allows registering to various backend event. Use this action to create notifications that will react to events such as new video was uploaded or metadata field was updated. To see the list of available event types, call the listTemplates action.



381
382
383
384
385
386
387
388
389
390
# File 'lib/kaltura_plugins/kaltura_event_notification_client_plugin.rb', line 381

def clone(id, event_notification_template=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'id', id)
	client.add_param(kparams, 'eventNotificationTemplate', event_notification_template)
	client.queue_service_action_call('eventnotification_eventnotificationtemplate', 'clone', 'KalturaEventNotificationTemplate', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#delete(id) ⇒ Object

Delete an event notification template object



432
433
434
435
436
437
438
439
440
# File 'lib/kaltura_plugins/kaltura_event_notification_client_plugin.rb', line 432

def delete(id)
	kparams = {}
	client.add_param(kparams, 'id', id)
	client.queue_service_action_call('eventnotification_eventnotificationtemplate', 'delete', '', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#dispatch(id, scope) ⇒ Object

Dispatch event notification object by id



468
469
470
471
472
473
474
475
476
477
# File 'lib/kaltura_plugins/kaltura_event_notification_client_plugin.rb', line 468

def dispatch(id, scope)
	kparams = {}
	client.add_param(kparams, 'id', id)
	client.add_param(kparams, 'scope', scope)
	client.queue_service_action_call('eventnotification_eventnotificationtemplate', 'dispatch', 'int', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#get(id) ⇒ Object

Retrieve an event notification template object by id



394
395
396
397
398
399
400
401
402
# File 'lib/kaltura_plugins/kaltura_event_notification_client_plugin.rb', line 394

def get(id)
	kparams = {}
	client.add_param(kparams, 'id', id)
	client.queue_service_action_call('eventnotification_eventnotificationtemplate', 'get', 'KalturaEventNotificationTemplate', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

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

list event notification template objects



444
445
446
447
448
449
450
451
452
453
# File 'lib/kaltura_plugins/kaltura_event_notification_client_plugin.rb', line 444

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

#list_by_partner(filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ Object



455
456
457
458
459
460
461
462
463
464
# File 'lib/kaltura_plugins/kaltura_event_notification_client_plugin.rb', line 455

def list_by_partner(filter=KalturaNotImplemented, pager=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'filter', filter)
	client.add_param(kparams, 'pager', pager)
	client.queue_service_action_call('eventnotification_eventnotificationtemplate', 'listByPartner', 'KalturaEventNotificationTemplateListResponse', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#list_templates(filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ Object

Action lists the template partner event notification templates.



481
482
483
484
485
486
487
488
489
490
# File 'lib/kaltura_plugins/kaltura_event_notification_client_plugin.rb', line 481

def list_templates(filter=KalturaNotImplemented, pager=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'filter', filter)
	client.add_param(kparams, 'pager', pager)
	client.queue_service_action_call('eventnotification_eventnotificationtemplate', 'listTemplates', 'KalturaEventNotificationTemplateListResponse', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#update(id, event_notification_template) ⇒ Object

Update an existing event notification template object



406
407
408
409
410
411
412
413
414
415
# File 'lib/kaltura_plugins/kaltura_event_notification_client_plugin.rb', line 406

def update(id, event_notification_template)
	kparams = {}
	client.add_param(kparams, 'id', id)
	client.add_param(kparams, 'eventNotificationTemplate', event_notification_template)
	client.queue_service_action_call('eventnotification_eventnotificationtemplate', 'update', 'KalturaEventNotificationTemplate', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#update_status(id, status) ⇒ Object

Update event notification template status by id



419
420
421
422
423
424
425
426
427
428
# File 'lib/kaltura_plugins/kaltura_event_notification_client_plugin.rb', line 419

def update_status(id, status)
	kparams = {}
	client.add_param(kparams, 'id', id)
	client.add_param(kparams, 'status', status)
	client.queue_service_action_call('eventnotification_eventnotificationtemplate', 'updateStatus', 'KalturaEventNotificationTemplate', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end