diff --git a/incident.go b/incident.go index 3c7a4330..1d6d249d 100644 --- a/incident.go +++ b/incident.go @@ -90,6 +90,17 @@ func (c *Client) ManageIncidents(from string, incidents []Incident) error { return e } +// MergeIncidents +// Uses APIObject for cleaner creation +func (c *Client) MergeIncidents(from string, id string, incidents []APIObject) error { + r := make(map[string][]APIObject) + r["source_incidents"] = incidents + headers := make(map[string]string) + headers["From"] = from + _, e := c.put("/incidents/" + id + "/merge", r, &headers) + return e +} + // GetIncident shows detailed information about an incident. func (c *Client) GetIncident(id string) (*Incident, error) { resp, err := c.get("/incidents/" + id)