api/graph.go
func (a *API) FetchGraphs() (*[]Graph, error) {
	result, err := a.Get(config.GraphPrefix)
	if err != nil {
		return nil, err
	}

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

	return &graphs, nil
}
func (a *API) FetchGraphs() (*[]Graph, error) {
	result, err := a.Get(config.GraphPrefix)
	if err != nil {
		return nil, err
	}

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

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