statusio 0.2.6 → 0.2.7

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
- SHA1:
3
- metadata.gz: 9dee10317096e1b234e20672cf924098a5d27eb8
4
- data.tar.gz: 5404f4ef7030fc4de63f5bd7250b20b6b3b9c29f
2
+ SHA256:
3
+ metadata.gz: 7b4a3b30a513becfd5520f697a29be95d552bc8e9315b3d6f90b0d0d22695707
4
+ data.tar.gz: b866d78524b2312c5307b2a244191c5d0c6789957ecf7935c5f13a81dcae2a99
5
5
  SHA512:
6
- metadata.gz: 91bf57823d43a18030eee14fe81fc4b41ca41225ec8b4ce0d4d1c0f55606e57d37c377bc36ef54faf2cf61cc2fae2224c929ec4de6a2e679f37c6374afb7ccf1
7
- data.tar.gz: ba0a8a6e23f57e33e337a39fbcd061b441a7caf59fb2084b42fabfd08b2ae77ec6d7d7e0905361659f01e86375ede0eb82d6185ba7b3526d3e4288830bce0d48
6
+ metadata.gz: '096dbdf6cb8434e4c8eedd7a4e5ee99a3b55690deea2b510f596aadc90643ae3cbbdcc78d1400916cb85fe4e4ea7619cd270b4496c5021399a09b4534be686a1'
7
+ data.tar.gz: 5775696739e9f35f958229ac8ed5915d0d63e4a73ea09f7384e1af2eeaf64cdd955accb7fe2a626f819dac2254844acf695c91ca06490a1e573a90311efc6355
data/lib/statusio.rb CHANGED
@@ -189,11 +189,12 @@ class StatusioClient
189
189
  # @param infrastructure_affected(array) ID of each affected component and container combo
190
190
  # @param current_status(int) The status of the components and containers affected by this incident (StatusioClient::STATUS_#).
191
191
  # @param current_state(int) The state of this incident (StatusioClient::STATE_#).
192
+ # @param message_subject(string) Message subject for email notifications
192
193
  # @param notifications(int) Bitmasked notifications (StatusioClient::NOTIFY_#). To use multiple just add them up (ie StatusioClient::NOTIFY_SMS + StatusioClient::NOTIFY_SLACK).
193
194
  # @param all_infrastructure_affected(string) Affect all components and containers (default = 0)
194
195
  # @return object
195
196
 
196
- def incident_create(statuspage_id, incident_name, incident_details, infrastructure_affected, current_status, current_state, notifications = 0, all_infrastructure_affected = "0")
197
+ def incident_create(statuspage_id, incident_name, incident_details, infrastructure_affected, current_status, current_state, message_subject, notifications = 0, all_infrastructure_affected = "0")
197
198
  data = get_notify(notifications)
198
199
  data['statuspage_id'] = statuspage_id
199
200
  data['incident_name'] = incident_name
@@ -201,6 +202,7 @@ class StatusioClient
201
202
  data['infrastructure_affected'] = infrastructure_affected
202
203
  data['current_status'] = current_status
203
204
  data['current_state'] = current_state
205
+ data['message_subject'] = message_subject
204
206
  data['all_infrastructure_affected'] = all_infrastructure_affected
205
207
 
206
208
  request :method => :post,
@@ -216,16 +218,18 @@ class StatusioClient
216
218
  # @param incident_details(string) Message describing this incident
217
219
  # @param current_status(int) The status of the components and containers affected by this incident (StatusioClient::STATUS_#).
218
220
  # @param current_state(int) The state of this incident (StatusioClient::STATE_#).
221
+ # @param message_subject(string) Message subject for email notifications
219
222
  # @param notifications(int) Bitmasked notifications (StatusioClient::NOTIFY_#). To use multiple just add them up (ie StatusioClient::NOTIFY_SMS + StatusioClient::NOTIFY_SLACK).
220
223
  # @return object
221
224
 
222
- def incident_update(statuspage_id, incident_id, incident_details, current_status, current_state, notifications = 0)
225
+ def incident_update(statuspage_id, incident_id, incident_details, current_status, current_state, message_subject, notifications = 0)
223
226
  data = get_notify(notifications)
224
227
  data['statuspage_id'] = statuspage_id
225
228
  data['incident_id'] = incident_id
226
229
  data['incident_details'] = incident_details
227
230
  data['current_status'] = current_status
228
231
  data['current_state'] = current_state
232
+ data['message_subject'] = message_subject
229
233
 
230
234
  request :method => :post,
231
235
  :url => @url + 'incident/update',
@@ -240,16 +244,18 @@ class StatusioClient
240
244
  # @param incident_details(string) Message describing this incident
241
245
  # @param current_status(int) The status of the components and containers affected by this incident (StatusioClient::STATUS_#).
242
246
  # @param current_state(int) The state of this incident (StatusioClient::STATE_#).
247
+ # @param message_subject(string) Message subject for email notifications
243
248
  # @param notifications(int) Bitmasked notifications (StatusioClient::NOTIFY_#). To use multiple just add them up (ie StatusioClient::NOTIFY_SMS + StatusioClient::NOTIFY_SLACK).
244
249
  # @return object
245
250
 
246
- def incident_resolve(statuspage_id, incident_id, incident_details, current_status, current_state, notifications = 0)
251
+ def incident_resolve(statuspage_id, incident_id, incident_details, current_status, current_state, message_subject, notifications = 0)
247
252
  data = get_notify(notifications)
248
253
  data['statuspage_id'] = statuspage_id
249
254
  data['incident_id'] = incident_id
250
255
  data['incident_details'] = incident_details
251
256
  data['current_status'] = current_status
252
257
  data['current_state'] =current_state
258
+ data['message_subject'] = message_subject
253
259
 
254
260
  request :method => :post,
255
261
  :url => @url + 'incident/resolve',
@@ -334,6 +340,7 @@ class StatusioClient
334
340
  # @param time_planned_start(string) Time maintenance is expected to start
335
341
  # @param date_planned_end(string) Date maintenance is expected to end
336
342
  # @param time_planned_end(string) Time maintenance is expected to end
343
+ # @param message_subject(string) Message subject for email notifications
337
344
  # @param automation(string) Automatically start and end the maintenance (default = 0)
338
345
  # @param all_infrastructure_affected(string) Affect all components and containers (default = 0)
339
346
  # @param maintenance_notify_now(string) Notify subscribers now (1 = Send notification)
@@ -344,7 +351,7 @@ class StatusioClient
344
351
 
345
352
  def maintenance_schedule(statuspage_id, maintenance_name, maintenance_details, infrastructure_affected,
346
353
  date_planned_start, time_planned_start, date_planned_end, time_planned_end,
347
- automation = "0", all_infrastructure_affected = "0",
354
+ message_subject, automation = "0", all_infrastructure_affected = "0",
348
355
  maintenance_notify_now = "0", maintenance_notify_1_hr = "0",
349
356
  maintenance_notify_24_hr = "0", maintenance_notify_72_hr = "0")
350
357
  data = {}
@@ -357,6 +364,7 @@ class StatusioClient
357
364
  data['time_planned_start'] = time_planned_start
358
365
  data['date_planned_end'] = date_planned_end
359
366
  data['time_planned_end'] = time_planned_end
367
+ data['message_subject'] = message_subject
360
368
  data['automation'] = automation
361
369
  data['maintenance_notify_now'] = maintenance_notify_now
362
370
  data['maintenance_notify_1_hr'] = maintenance_notify_1_hr
@@ -374,14 +382,16 @@ class StatusioClient
374
382
  # @param statuspage_id(string) Status page ID
375
383
  # @param maintenance_id(string) Maintenance ID
376
384
  # @param maintenance_details(string) Message describing this maintenance update
385
+ # @param message_subject(string) Message subject for email notifications
377
386
  # @param notifications(int) Bitmasked notifications (StatusioClient::NOTIFY_#). To use multiple just add them up (ie StatusioClient::NOTIFY_SMS + StatusioClient::NOTIFY_SLACK).
378
387
  # @return object
379
388
 
380
- def maintenance_start(statuspage_id, maintenance_id, maintenance_details, notifications = 0)
389
+ def maintenance_start(statuspage_id, maintenance_id, maintenance_details, message_subject, notifications = 0)
381
390
  data = get_notify(notifications)
382
391
  data['statuspage_id'] = statuspage_id
383
392
  data['maintenance_id'] = maintenance_id
384
393
  data['maintenance_details'] = maintenance_details
394
+ data['message_subject'] = message_subject
385
395
 
386
396
  request :method => :post,
387
397
  :url => @url + 'maintenance/start',
@@ -394,14 +404,16 @@ class StatusioClient
394
404
  # @param statuspage_id(string) Status page ID
395
405
  # @param maintenance_id(string) Maintenance ID
396
406
  # @param maintenance_details(string) Message describing this maintenance
407
+ # @param message_subject(string) Message subject for email notifications
397
408
  # @param notifications(int) Bitmasked notifications (StatusioClient::NOTIFY_#). To use multiple just add them up (ie StatusioClient::NOTIFY_SMS + StatusioClient::NOTIFY_SLACK).
398
409
  # @return object
399
410
 
400
- def maintenance_update(statuspage_id, maintenance_id, maintenance_details, notifications = 0)
411
+ def maintenance_update(statuspage_id, maintenance_id, maintenance_details, message_subject, notifications = 0)
401
412
  data = get_notify(notifications)
402
413
  data['statuspage_id'] = statuspage_id
403
414
  data['maintenance_id'] = maintenance_id
404
415
  data['maintenance_details'] = maintenance_details
416
+ data['message_subject'] = message_subject
405
417
 
406
418
  request :method => :post,
407
419
  :url => @url + 'maintenance/update',
@@ -414,14 +426,16 @@ class StatusioClient
414
426
  # @param statuspage_id(string) Status page ID
415
427
  # @param maintenance_id(string) Maintenance ID
416
428
  # @param maintenance_details(string) Message describing this maintenance
429
+ # @param message_subject(string) Message subject for email notifications
417
430
  # @param notifications(int) Bitmasked notifications (StatusioClient::NOTIFY_#). To use multiple just add them up (ie StatusioClient::NOTIFY_SMS + StatusioClient::NOTIFY_SLACK).
418
431
  # @return object
419
432
 
420
- def maintenance_finish(statuspage_id, maintenance_id, maintenance_details, notifications = 0)
433
+ def maintenance_finish(statuspage_id, maintenance_id, maintenance_details, message_subject, notifications = 0)
421
434
  data = get_notify(notifications)
422
435
  data['statuspage_id'] = statuspage_id
423
436
  data['maintenance_id'] = maintenance_id
424
437
  data['maintenance_details'] = maintenance_details
438
+ data['message_subject'] = message_subject
425
439
 
426
440
  request :method => :post,
427
441
  :url => @url + 'maintenance/finish',
@@ -1,3 +1,3 @@
1
1
  class StatusioClient
2
- VERSION = '0.2.6'
2
+ VERSION = '0.2.7'
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.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Status.io
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-03-27 00:00:00.000000000 Z
11
+ date: 2020-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -62,7 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
62
62
  version: '0'
63
63
  requirements: []
64
64
  rubyforge_project:
65
- rubygems_version: 2.6.14
65
+ rubygems_version: 2.7.6
66
66
  signing_key:
67
67
  specification_version: 4
68
68
  summary: Ruby library wrapper for Status.io