From 8c8a1d966271e94dddec6bb8450be5729b657041 Mon Sep 17 00:00:00 2001 From: Sullivan SENECHAL Date: Thu, 14 Mar 2019 12:25:09 +0100 Subject: [PATCH] Incident alerts --- incident.go | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/incident.go b/incident.go index c172bb09..783f4b52 100644 --- a/incident.go +++ b/incident.go @@ -176,15 +176,21 @@ func (c *Client) ListIncidentNotes(id string) ([]IncidentNote, error) { // IncidentAlert is a alert for the specified incident. type IncidentAlert struct { - ID string `json:"id,omitempty"` - Summary string `json:"summary,omitempty"` - CreatedAt string `json:"created_at,omitempty"` - AlertKey string `json:"alert_key,omitempty"` + APIObject + CreatedAt string `json:"created_at,omitempty"` + Status string `json:"status,omitempty"` + AlertKey string `json:"alert_key,omitempty"` + Service APIObject `json:"service,omitempty"` + Body []interface{} `json:"body,omitempty"` + Incident APIReference `json:"incident,omitempty"` + Suppressed bool `json:"suppressed,omitempty"` + Severity string `json:"severity,omitempty"` + Integration APIObject `json:"integration,omitempty"` } // ListIncidentAlerts lists existing alerts for the specified incident. func (c *Client) ListIncidentAlerts(id string) ([]IncidentAlert, error) { - resp, err := c.get("/incidents/"+id+"/alerts") + resp, err := c.get("/incidents/" + id + "/alerts") if err != nil { return nil, err }