Class: Runcible::Resources::EventNotifier
- Defined in:
- lib/runcible/resources/event_notifier.rb
Overview
Defined Under Namespace
Classes: EventTypes, NotifierTypes
Class Method Summary collapse
-
.create(notifier_type_id, notifier_config, event_types) ⇒ RestClient::Response
Creates an Event Notification.
-
.delete(id) ⇒ RestClient::Response
Deletes an Event Notification.
-
.list ⇒ RestClient::Response
List all Event Notifiers.
-
.path(id = nil) ⇒ String
Generates the API path for Event Notifiers.
Methods inherited from Base
add_http_auth_header, add_oauth_header, call, combine_get_params, config, config=, generate_log_message, generate_payload, get_response, log_debug, log_exception, process_response, required_params
Class Method Details
.create(notifier_type_id, notifier_config, event_types) ⇒ RestClient::Response
Creates an Event Notification
55 56 57 58 |
# File 'lib/runcible/resources/event_notifier.rb', line 55 def self.create(notifier_type_id, notifier_config, event_types) required = required_params(binding.send(:local_variables), binding) call(:post, path, :payload => {:required => required}) end |
.delete(id) ⇒ RestClient::Response
Deletes an Event Notification
64 65 66 |
# File 'lib/runcible/resources/event_notifier.rb', line 64 def self.delete(id) call(:delete, path(id)) end |
.list ⇒ RestClient::Response
List all Event Notifiers
72 73 74 |
# File 'lib/runcible/resources/event_notifier.rb', line 72 def self.list call(:get, path) end |
.path(id = nil) ⇒ String
Generates the API path for Event Notifiers
45 46 47 |
# File 'lib/runcible/resources/event_notifier.rb', line 45 def self.path(id=nil) (id == nil) ? "events/" : "events/#{id}/" end |