statusio 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e533cb910a7c25a41fd1d19e55b25ef988bd1d06
4
- data.tar.gz: bf0ff698f655c41e860cd8b5a7cd6df1c7cdaaf6
3
+ metadata.gz: a6ba7edd25cde7a80884e6e068c7dca3bf27c737
4
+ data.tar.gz: 0a3c10baacc0b50d32dfb9fba6f8967cb99e0c25
5
5
  SHA512:
6
- metadata.gz: a250779c4b223444a9a5daf91cd13e4317a81403107c4a4a0a7cf59c89953f81b00051367eddb8b589cca22e1729aee2f0eb8798c266622464280813139bbaf6
7
- data.tar.gz: b2c64fcab702b4bce56a2dccd8fbc93fc1f683682e83f2ed71a913ba894bfa1730ac3f7141176da4a070519a0effb67e1e9523f57a559d658c1d39777e6d814a
6
+ metadata.gz: 4213fde2a11570631b9f784ee77565675d16b0bc06cb378a30698eebfd860c429ec5831d143f8cc9953091544819d88b450e710d73f865042d63315bac2b21fa
7
+ data.tar.gz: 5a9de25b3d1dd3f324b5452a5ff993357213e1f71b5344cd9efabc3e4cb9b290e5f3046b7a34b160b3fbad10fb892dab090e9dd623656fc6eec0e7375cf45d5b
data/lib/statusio.rb CHANGED
@@ -114,19 +114,19 @@ class StatusioClient
114
114
  # Update the status of a component on the fly without creating an incident or maintenance.
115
115
  #
116
116
  # @param statuspage_id(string) string Status page ID
117
- # @param components(array) ID of each affected component
118
- # @param containers(array) ID of each affected container
117
+ # @param component(string) ID of affected component
118
+ # @param container(string) ID of affected container
119
119
  # @param details(string) A brief message describing this update
120
120
  # @param current_status(int) Any numeric status code.
121
121
  # @return object
122
122
 
123
- def component_status_update(statuspage_id, components, containers, details, current_status)
123
+ def component_status_update(statuspage_id, component, container, details, current_status)
124
124
  request :method => :post,
125
125
  :url => @url + 'component/status/update',
126
126
  :payload => {
127
127
  'statuspage_id' => statuspage_id,
128
- 'components' => components,
129
- 'containers' => containers,
128
+ 'component' => component,
129
+ 'container' => container,
130
130
  'details' => details,
131
131
  'current_status' => current_status
132
132
  }
@@ -145,6 +145,16 @@ class StatusioClient
145
145
  :url => @url + 'incident/list/' + statuspage_id
146
146
  end
147
147
 
148
+ ##
149
+ # List all active and resolved incidents by ID.
150
+ #
151
+ # @param statuspage_id(string) Status page ID
152
+ # @return object
153
+
154
+ def incident_list_by_id(statuspage_id)
155
+ request :method => :get,
156
+ :url => @url + 'incidents/' + statuspage_id
157
+ end
148
158
 
149
159
  ##
150
160
  # Display incident message.
@@ -158,6 +168,18 @@ class StatusioClient
158
168
  :url => @url + 'incident/message/' + statuspage_id + '/' + message_id
159
169
  end
160
170
 
171
+ ##
172
+ # Get single incident.
173
+ #
174
+ # @param statuspage_id(string) Status page ID
175
+ # @param incident_id(string) Incident ID
176
+ # @return object
177
+
178
+ def incident_single(statuspage_id, incident_id)
179
+ request :method => :get,
180
+ :url => @url + 'incident/' + statuspage_id + '/' + incident_id
181
+ end
182
+
161
183
  ##
162
184
  # Create a new incident.
163
185
  #
@@ -265,6 +287,18 @@ class StatusioClient
265
287
  :url => @url + 'maintenance/list/' + statuspage_id
266
288
  end
267
289
 
290
+ ##
291
+ # List all active, resolved and upcoming maintenances by ID
292
+ #
293
+ # @param statuspage_id(string) Status page ID
294
+ # @return object
295
+ #/
296
+
297
+ def maintenance_list_by_id(statuspage_id)
298
+ request :method => :get,
299
+ :url => @url + 'maintenances/' + statuspage_id
300
+ end
301
+
268
302
  ##
269
303
  # Display maintenance message
270
304
  #
@@ -277,6 +311,18 @@ class StatusioClient
277
311
  :url => @url + 'maintenance/message/' + statuspage_id + '/' + message_id
278
312
  end
279
313
 
314
+ ##
315
+ # Get single maintenance
316
+ #
317
+ # @param statuspage_id(string) Status page ID
318
+ # @param maintenance_id(string) Maintenance ID
319
+ # @return object
320
+
321
+ def maintenance_single(statuspage_id, maintenance_id)
322
+ request :method => :get,
323
+ :url => @url + 'maintenance/' + statuspage_id + '/' + maintenance_id
324
+ end
325
+
280
326
  ##
281
327
  # Schedule a new maintenance
282
328
  #
@@ -1,3 +1,3 @@
1
1
  class StatusioClient
2
- VERSION = '0.2.3'
2
+ VERSION = '0.2.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: statusio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Status.io
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-12-20 00:00:00.000000000 Z
11
+ date: 2018-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client