api/contact_group.go
func (a *API) FetchContactGroups() (*[]ContactGroup, error) {
	result, err := a.Get(config.ContactGroupPrefix)
	if err != nil {
		return nil, err
	}

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

	return &groups, nil
}
func (a *API) FetchContactGroups() (*[]ContactGroup, error) {
	result, err := a.Get(config.ContactGroupPrefix)
	if err != nil {
		return nil, err
	}

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

	return &groups, nil
}
func ( a * API ) FetchContactGroups ( ) ( * [ ] ContactGroup , error ) { result , err := a . Get ( config . ContactGroupPrefix ) if err != nil { return nil , err } var groups [ ] ContactGroup if err := json . Unmarshal ( result , & groups ) ; err != nil { return nil , err } return & groups , nil }
// FetchContactGroups retrieves all contact groups available to the API Token.
FetchContactGroups retrieves all contact groups available to the API Token .