Class: Conductor::Http::Api::EventResourceApi
- Inherits:
-
Object
- Object
- Conductor::Http::Api::EventResourceApi
- Defined in:
- lib/conductor/http/api/event_resource_api.rb
Overview
EventResourceApi - API for event handler operations
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#add_event_handler(body) ⇒ void
Add an event handler.
-
#delete_queue_config(queue_type, queue_name) ⇒ void
Delete queue configuration.
-
#get_event_handlers ⇒ Array<EventHandler>
Get all event handlers.
-
#get_event_handlers_for_event(event, active_only: true) ⇒ Array<EventHandler>
Get event handlers for a specific event.
-
#get_queue_config(queue_type, queue_name) ⇒ Hash
Get queue configuration.
-
#get_queue_names ⇒ Hash<String, String>
Get all queue names.
-
#initialize(api_client = nil) ⇒ EventResourceApi
constructor
A new instance of EventResourceApi.
-
#put_queue_config(queue_type, queue_name, body) ⇒ void
Update queue configuration.
-
#remove_event_handler(name) ⇒ void
Remove an event handler.
-
#update_event_handler(body) ⇒ void
Update an event handler.
Constructor Details
#initialize(api_client = nil) ⇒ EventResourceApi
Returns a new instance of EventResourceApi.
12 13 14 |
# File 'lib/conductor/http/api/event_resource_api.rb', line 12 def initialize(api_client = nil) @api_client = api_client || ApiClient.new end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
10 11 12 |
# File 'lib/conductor/http/api/event_resource_api.rb', line 10 def api_client @api_client end |
Instance Method Details
#add_event_handler(body) ⇒ void
This method returns an undefined value.
Add an event handler
19 20 21 22 23 24 25 26 |
# File 'lib/conductor/http/api/event_resource_api.rb', line 19 def add_event_handler(body) @api_client.call_api( '/event', 'POST', body: body, return_http_data_only: true ) end |
#delete_queue_config(queue_type, queue_name) ⇒ void
This method returns an undefined value.
Delete queue configuration
111 112 113 114 115 116 117 118 |
# File 'lib/conductor/http/api/event_resource_api.rb', line 111 def delete_queue_config(queue_type, queue_name) @api_client.call_api( '/event/queue/config/{queueType}/{queueName}', 'DELETE', path_params: { queueType: queue_type, queueName: queue_name }, return_http_data_only: true ) end |
#get_event_handlers ⇒ Array<EventHandler>
Get all event handlers
42 43 44 45 46 47 48 49 |
# File 'lib/conductor/http/api/event_resource_api.rb', line 42 def get_event_handlers @api_client.call_api( '/event', 'GET', return_type: 'Array<EventHandler>', return_http_data_only: true ) end |
#get_event_handlers_for_event(event, active_only: true) ⇒ Array<EventHandler>
Get event handlers for a specific event
55 56 57 58 59 60 61 62 63 64 |
# File 'lib/conductor/http/api/event_resource_api.rb', line 55 def get_event_handlers_for_event(event, active_only: true) @api_client.call_api( '/event/{event}', 'GET', path_params: { event: event }, query_params: { activeOnly: active_only }, return_type: 'Array<EventHandler>', return_http_data_only: true ) end |
#get_queue_config(queue_type, queue_name) ⇒ Hash
Get queue configuration
82 83 84 85 86 87 88 89 90 |
# File 'lib/conductor/http/api/event_resource_api.rb', line 82 def get_queue_config(queue_type, queue_name) @api_client.call_api( '/event/queue/config/{queueType}/{queueName}', 'GET', path_params: { queueType: queue_type, queueName: queue_name }, return_type: 'Hash<String, Object>', return_http_data_only: true ) end |
#get_queue_names ⇒ Hash<String, String>
Get all queue names
122 123 124 125 126 127 128 129 |
# File 'lib/conductor/http/api/event_resource_api.rb', line 122 def get_queue_names @api_client.call_api( '/event/queue/config', 'GET', return_type: 'Hash<String, String>', return_http_data_only: true ) end |
#put_queue_config(queue_type, queue_name, body) ⇒ void
This method returns an undefined value.
Update queue configuration
97 98 99 100 101 102 103 104 105 |
# File 'lib/conductor/http/api/event_resource_api.rb', line 97 def put_queue_config(queue_type, queue_name, body) @api_client.call_api( '/event/queue/config/{queueType}/{queueName}', 'PUT', path_params: { queueType: queue_type, queueName: queue_name }, body: body, return_http_data_only: true ) end |
#remove_event_handler(name) ⇒ void
This method returns an undefined value.
Remove an event handler
69 70 71 72 73 74 75 76 |
# File 'lib/conductor/http/api/event_resource_api.rb', line 69 def remove_event_handler(name) @api_client.call_api( '/event/{name}', 'DELETE', path_params: { name: name }, return_http_data_only: true ) end |
#update_event_handler(body) ⇒ void
This method returns an undefined value.
Update an event handler
31 32 33 34 35 36 37 38 |
# File 'lib/conductor/http/api/event_resource_api.rb', line 31 def update_event_handler(body) @api_client.call_api( '/event', 'PUT', body: body, return_http_data_only: true ) end |