api/alert.go
func (a *API) FetchAlerts() (*[]Alert, error) {
	result, err := a.Get(config.AlertPrefix)
	if err != nil {
		return nil, err
	}

	var alerts []Alert
	if err := json.Unmarshal(result, &alerts); err != nil {
		return nil, err
	}

	return &alerts, nil
}
func (a *API) FetchAlerts() (*[]Alert, error) {
	result, err := a.Get(config.AlertPrefix)
	if err != nil {
		return nil, err
	}

	var alerts []Alert
	if err := json.Unmarshal(result, &alerts); err != nil {
		return nil, err
	}

	return &alerts, nil
}
func ( a * API ) FetchAlerts ( ) ( * [ ] Alert , error ) { result , err := a . Get ( config . AlertPrefix ) if err != nil { return nil , err } var alerts [ ] Alert if err := json . Unmarshal ( result , & alerts ) ; err != nil { return nil , err } return & alerts , nil }
// FetchAlerts retrieves all alerts available to the API Token.
FetchAlerts retrieves all alerts available to the API Token .