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", }; }
public Task <Response <bool> > Finish(Maintenance maintenance) { return(client.PostAsync <Response <bool> >("maintenance/update", CreateMaintenanceBody(maintenance))); }
public Task <Response <bool> > Start(Maintenance maintenance) { return(client.PostAsync <Response <bool> >("maintenance/start", CreateMaintenanceBody(maintenance))); }
public Task<Response<bool>> Finish(Maintenance maintenance) { return client.PostAsync<Response<bool>>("maintenance/update", CreateMaintenanceBody(maintenance)); }
public Task<Response<bool>> Start(Maintenance maintenance) { return client.PostAsync<Response<bool>>("maintenance/start", CreateMaintenanceBody(maintenance)); }