Exemplo n.º 1
0
 private object CreateMaintenanceBody(Maintenance schedule)
 {
     return new
     {
         statuspage_id = client.GetStatusPageId(schedule.StatusPageId),
         maintenance_details = schedule.Details,
         notify_email = schedule.NotifyEmail ? "1" : "0",
         notify_sms = schedule.NotifySms ? "1" : "0",
         notify_webhook = schedule.NotifyWebhook ? "1" : "0",
         social = schedule.NotifySocial ? "1" : "0",
         irc = schedule.NotifyIrc ? "1" : "0",
         hipchat = schedule.NotifyHipchat ? "1" : "0",
         slack = schedule.NotifySlack ? "1" : "0",
     };
 }
Exemplo n.º 2
0
 public Task <Response <bool> > Finish(Maintenance maintenance)
 {
     return(client.PostAsync <Response <bool> >("maintenance/update", CreateMaintenanceBody(maintenance)));
 }
Exemplo n.º 3
0
 public Task <Response <bool> > Start(Maintenance maintenance)
 {
     return(client.PostAsync <Response <bool> >("maintenance/start", CreateMaintenanceBody(maintenance)));
 }
Exemplo n.º 4
0
 public Task<Response<bool>> Finish(Maintenance maintenance)
 {
     return client.PostAsync<Response<bool>>("maintenance/update", CreateMaintenanceBody(maintenance));
 }
Exemplo n.º 5
0
 public Task<Response<bool>> Start(Maintenance maintenance)
 {
     return client.PostAsync<Response<bool>>("maintenance/start", CreateMaintenanceBody(maintenance));
 }