Class: Beeper::Client
- Inherits:
-
Object
- Object
- Beeper::Client
- Defined in:
- lib/beeper/client.rb
Constant Summary collapse
- COLLECTIONS =
[:incidents, :services, :maintenance_windows].freeze
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#requester_id ⇒ Object
Returns the value of attribute requester_id.
-
#subdomain ⇒ Object
Returns the value of attribute subdomain.
Instance Method Summary collapse
- #configured? ⇒ Boolean
- #create_maintenance_window(maintenance_window) ⇒ Object
- #delete_maintenance_window(id) ⇒ Object
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
8 9 10 |
# File 'lib/beeper/client.rb', line 8 def api_key @api_key end |
#requester_id ⇒ Object
Returns the value of attribute requester_id.
8 9 10 |
# File 'lib/beeper/client.rb', line 8 def requester_id @requester_id end |
#subdomain ⇒ Object
Returns the value of attribute subdomain.
8 9 10 |
# File 'lib/beeper/client.rb', line 8 def subdomain @subdomain end |
Instance Method Details
#configured? ⇒ Boolean
10 11 12 |
# File 'lib/beeper/client.rb', line 10 def configured? !@api_key.nil? && !@subdomain.nil? end |
#create_maintenance_window(maintenance_window) ⇒ Object
22 23 24 |
# File 'lib/beeper/client.rb', line 22 def create_maintenance_window(maintenance_window) post(:maintenance_windows, maintenance_window) end |
#delete_maintenance_window(id) ⇒ Object
26 27 28 |
# File 'lib/beeper/client.rb', line 26 def delete_maintenance_window(id) delete(:maintenance_windows, { :id => id }) end |