Class: Kaltura::KalturaEventNotificationTemplateService
- Inherits:
-
KalturaServiceBase
- Object
- KalturaServiceBase
- Kaltura::KalturaEventNotificationTemplateService
- 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
Instance Method Summary collapse
-
#add(event_notification_template) ⇒ KalturaEventNotificationTemplate
This action allows for the creation of new backend event types in the system.
-
#clone(id, event_notification_template = KalturaNotImplemented) ⇒ KalturaEventNotificationTemplate
This action allows registering to various backend event.
-
#delete(id) ⇒ Object
Delete an event notification template object.
-
#dispatch(id, scope) ⇒ int
Dispatch event notification object by id.
-
#get(id) ⇒ KalturaEventNotificationTemplate
Retrieve an event notification template object by id.
-
#initialize(client) ⇒ KalturaEventNotificationTemplateService
constructor
A new instance of KalturaEventNotificationTemplateService.
-
#list(filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ KalturaEventNotificationTemplateListResponse
list event notification template objects.
- #list_by_partner(filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ KalturaEventNotificationTemplateListResponse
-
#list_templates(filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ KalturaEventNotificationTemplateListResponse
Action lists the template partner event notification templates.
-
#register(notification_template_system_name, push_notification_params) ⇒ KalturaPushNotificationData
Register to a queue from which event messages will be provided according to given template.
-
#send_command(notification_template_system_name, push_notification_params, command) ⇒ Object
Clear queue messages.
-
#update(id, event_notification_template) ⇒ KalturaEventNotificationTemplate
Update an existing event notification template object.
-
#update_status(id, status) ⇒ KalturaEventNotificationTemplate
Update event notification template status by id.
Constructor Details
#initialize(client) ⇒ KalturaEventNotificationTemplateService
Returns a new instance of KalturaEventNotificationTemplateService.
458 459 460 |
# File 'lib/kaltura_plugins/kaltura_event_notification_client_plugin.rb', line 458 def initialize(client) super(client) end |
Instance Method Details
#add(event_notification_template) ⇒ KalturaEventNotificationTemplate
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.
464 465 466 467 468 469 470 471 472 |
# 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 |
#clone(id, event_notification_template = KalturaNotImplemented) ⇒ KalturaEventNotificationTemplate
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.
476 477 478 479 480 481 482 483 484 485 |
# 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(id) ⇒ Object
Delete an event notification template object
489 490 491 492 493 494 495 496 497 |
# 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(id, scope) ⇒ int
Dispatch event notification object by id
501 502 503 504 505 506 507 508 509 510 |
# 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 |
#get(id) ⇒ KalturaEventNotificationTemplate
Retrieve an event notification template object by id
514 515 516 517 518 519 520 521 522 |
# 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(filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ KalturaEventNotificationTemplateListResponse
list event notification template objects
526 527 528 529 530 531 532 533 534 535 |
# 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 |
#list_by_partner(filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ KalturaEventNotificationTemplateListResponse
538 539 540 541 542 543 544 545 546 547 |
# 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 |
#list_templates(filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ KalturaEventNotificationTemplateListResponse
Action lists the template partner event notification templates.
551 552 553 554 555 556 557 558 559 560 |
# 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(notification_template_system_name, push_notification_params) ⇒ KalturaPushNotificationData
Register to a queue from which event messages will be provided according to given template. Queue will be created if not already exists
564 565 566 567 568 569 570 571 572 573 |
# 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 |
#send_command(notification_template_system_name, push_notification_params, command) ⇒ Object
Clear queue messages
577 578 579 580 581 582 583 584 585 586 587 |
# 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(id, event_notification_template) ⇒ KalturaEventNotificationTemplate
Update an existing event notification template object
591 592 593 594 595 596 597 598 599 600 |
# 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_status(id, status) ⇒ KalturaEventNotificationTemplate
Update event notification template status by id
604 605 606 607 608 609 610 611 612 613 |
# 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 |