func (a *API) FetchMetrics() (*[]Metric, error) {
	result, err := a.Get(config.MetricPrefix)
	if err != nil {
		return nil, err
	}

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

	return &metrics, nil
}
func (a *API) FetchMetrics() (*[]Metric, error) {
	result, err := a.Get(config.MetricPrefix)
	if err != nil {
		return nil, err
	}

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

	return &metrics, nil
}
func ( a * API ) FetchMetrics ( ) ( * [ ] Metric , error ) { result , err := a . Get ( config . MetricPrefix ) if err != nil { return nil , err } var metrics [ ] Metric if err := json . Unmarshal ( result , & metrics ) ; err != nil { return nil , err } return & metrics , nil }
// FetchMetrics retrieves all metrics available to API Token.
FetchMetrics retrieves all metrics available to API Token .