Class: CachetComponents
- Inherits:
-
CachetClient
- Object
- CachetClient
- CachetComponents
- Defined in:
- lib/cachet.rb
Overview
Inherits CachetClient and handles all Components API Calls
Constant Summary
Constants inherited from CachetClient
CachetClient::INCIDENT_FIXED, CachetClient::INCIDENT_IDENTIFIED, CachetClient::INCIDENT_INVESTIGATING, CachetClient::INCIDENT_SCHEDULED, CachetClient::INCIDENT_WATCHING, CachetClient::STATUS_MAJOR_OUTAGE, CachetClient::STATUS_OPERATIONAL, CachetClient::STATUS_PARTIAL_OUTAGE, CachetClient::STATUS_PERFORMANCE_ISSUES, CachetClient::VERSION
Instance Method Summary collapse
-
#create(options) ⇒ Object
Create Component.
-
#delete(options) ⇒ Object
Delete Component.
-
#groups_create(options) ⇒ Object
Create Component Group.
-
#groups_delete(options) ⇒ Object
Delete Component Group.
-
#groups_list ⇒ Object
List all Component Groups.
-
#groups_list_id(options) ⇒ Object
List Component Group by ID.
-
#groups_update(options) ⇒ Object
Update Component Group.
-
#list(options = nil) ⇒ Object
List all Components.
-
#list_id(options) ⇒ Object
List Component by ID.
-
#update(options) ⇒ Object
Update Component.
Methods inherited from CachetClient
Constructor Details
This class inherits a constructor from CachetClient
Instance Method Details
#create(options) ⇒ Object
Create Component.
131 132 133 134 135 |
# File 'lib/cachet.rb', line 131 def create() request method: :post, url: @base_url + 'components', payload: end |
#delete(options) ⇒ Object
Delete Component.
161 162 163 164 |
# File 'lib/cachet.rb', line 161 def delete() request method: :delete, url: @base_url + 'components/' + ['id'].to_s end |
#groups_create(options) ⇒ Object
Create Component Group.
195 196 197 198 199 |
# File 'lib/cachet.rb', line 195 def groups_create() request method: :post, url: @base_url + 'components/groups', payload: end |
#groups_delete(options) ⇒ Object
Delete Component Group.
222 223 224 225 |
# File 'lib/cachet.rb', line 222 def groups_delete() request method: :delete, url: @base_url + 'components/groups/' + ['id'].to_s end |
#groups_list ⇒ Object
List all Component Groups.
171 172 173 174 |
# File 'lib/cachet.rb', line 171 def groups_list request method: :get, url: @base_url + 'components/groups' end |
#groups_list_id(options) ⇒ Object
List Component Group by ID.
182 183 184 185 |
# File 'lib/cachet.rb', line 182 def groups_list_id() request method: :get, url: @base_url + 'components/groups/' + ['id'].to_s end |
#groups_update(options) ⇒ Object
Update Component Group.
210 211 212 213 214 |
# File 'lib/cachet.rb', line 210 def groups_update() request method: :put, url: @base_url + 'components/groups/' + ['id'].to_s, payload: end |
#list(options = nil) ⇒ Object
List all Components.
103 104 105 106 107 |
# File 'lib/cachet.rb', line 103 def list( = nil) request method: :get, url: @base_url + 'components', headers: {params: } end |
#list_id(options) ⇒ Object
List Component by ID.
114 115 116 117 |
# File 'lib/cachet.rb', line 114 def list_id() request method: :get, url: @base_url + 'components/' + ['id'].to_s end |
#update(options) ⇒ Object
Update Component.
149 150 151 152 153 |
# File 'lib/cachet.rb', line 149 def update() request method: :put, url: @base_url + 'components/' + ['id'].to_s, payload: end |