// Test represents a statuscake Test
type Test struct {
- // ThiTestID is an int, use this to get more details about this test. If not provided will insert a new check, else will update
+ // TestID is an int, use this to get more details about this test. If not provided will insert a new check, else will update
TestID int `json:"TestID" querystring:"TestID" querystringoptions:"omitempty"`
// Sent tfalse To Unpause and true To Pause.
// A Port to use on TCP Tests
Port int `json:"Port" querystring:"Port"`
- // Contact group ID - will return int of contact group used else 0
- ContactID int `json:"ContactID" querystring:"ContactGroup"`
+ // Contact group ID - deprecated in favor of ContactGroup but still provided in the API detail response
+ ContactID int `json:"ContactID"`
+
+ // Contact group IDs - will return list of ints or empty if not provided
+ ContactGroup []string `json:"ContactGroup" querystring:"ContactGroup"`
// Current status at last test
Status string `json:"Status"`
TriggerRate int `json:"TriggerRate" querystring:"TriggerRate"`
// Tags should be seperated by a comma - no spacing between tags (this,is,a set,of,tags)
- TestTags string `json:"TestTags" querystring:"TestTags"`
+ TestTags []string `json:"TestTags" querystring:"TestTags"`
// Comma Seperated List of StatusCodes to Trigger Error on (on Update will replace, so send full list each time)
StatusCodes string `json:"StatusCodes" querystring:"StatusCodes"`
}
if !ur.Success {
- return nil, &updateError{Issues: ur.Issues}
+ return nil, &updateError{Issues: ur.Issues, Message: ur.Message}
}
t2 := *t