class Kaltura::KalturaEventNotificationTemplateService
Event notification template service lets you create and manage event notification templates
Public Class Methods
Kaltura::KalturaServiceBase::new
# File lib/kaltura_plugins/kaltura_event_notification_client_plugin.rb, line 458 def initialize(client) super(client) end
Public Instance Methods
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. @return [KalturaEventNotificationTemplate]
# File lib/kaltura_plugins/kaltura_event_notification_client_plugin.rb, line 464 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
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. @return [KalturaEventNotificationTemplate]
# File lib/kaltura_plugins/kaltura_event_notification_client_plugin.rb, line 476 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 an event notification template object @return []
# File lib/kaltura_plugins/kaltura_event_notification_client_plugin.rb, line 489 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 event notification object by id @return [int]
# File lib/kaltura_plugins/kaltura_event_notification_client_plugin.rb, line 501 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
Retrieve an event notification template object by id @return [KalturaEventNotificationTemplate]
# File lib/kaltura_plugins/kaltura_event_notification_client_plugin.rb, line 514 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 event notification template objects @return [KalturaEventNotificationTemplateListResponse]
# File lib/kaltura_plugins/kaltura_event_notification_client_plugin.rb, line 526 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
@return [KalturaEventNotificationTemplateListResponse]
# File lib/kaltura_plugins/kaltura_event_notification_client_plugin.rb, line 538 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
Action lists the template partner event notification templates. @return [KalturaEventNotificationTemplateListResponse]
# File lib/kaltura_plugins/kaltura_event_notification_client_plugin.rb, line 551 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
Register to a queue from which event messages will be provided according to given template. Queue will be created if not already exists @return [KalturaPushNotificationData]
# File lib/kaltura_plugins/kaltura_event_notification_client_plugin.rb, line 564 def register(notification_template_system_name, push_notification_params) kparams = {} client.add_param(kparams, 'notificationTemplateSystemName', notification_template_system_name) client.add_param(kparams, 'pushNotificationParams', push_notification_params) client.queue_service_action_call('eventnotification_eventnotificationtemplate', 'register', 'KalturaPushNotificationData', kparams) if (client.is_multirequest) return nil end return client.do_queue() end
Clear queue messages @return []
# File lib/kaltura_plugins/kaltura_event_notification_client_plugin.rb, line 577 def send_command(notification_template_system_name, push_notification_params, command) kparams = {} client.add_param(kparams, 'notificationTemplateSystemName', notification_template_system_name) client.add_param(kparams, 'pushNotificationParams', push_notification_params) client.add_param(kparams, 'command', command) client.queue_service_action_call('eventnotification_eventnotificationtemplate', 'sendCommand', '', kparams) if (client.is_multirequest) return nil end return client.do_queue() end
Update an existing event notification template object @return [KalturaEventNotificationTemplate]
# File lib/kaltura_plugins/kaltura_event_notification_client_plugin.rb, line 591 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 event notification template status by id @return [KalturaEventNotificationTemplate]
# File lib/kaltura_plugins/kaltura_event_notification_client_plugin.rb, line 604 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