Versions in this module Expand all Collapse all v0 v0.0.1 May 4, 2024 Changes in this version + type Data struct + Options map[string]float64 + Timestamp Timestamp + Value float64 + type DataSlice []Data + func (s DataSlice) First() Data + func (s DataSlice) FirstOptions() map[string]float64 + func (s DataSlice) FirstValue() float64 + func (s DataSlice) HasOptions() bool + func (s DataSlice) IsEmpty() bool + func (s DataSlice) Last() Data + func (s DataSlice) LastOptions() map[string]float64 + func (s DataSlice) LastValue() float64 + type Format string + const FormatCSV + const FormatJSON + type Interval string + const Interval10m + const Interval1h + const Interval1m + const Interval1w + const Interval24h + type Request struct + Asset string + Category string + Client requestgen.AuthenticatedAPIClient + Currency *string + Format *Format + Interval *Interval + Metric string + Since *time.Time + TimestampFormat *string + Until *time.Time + func (r *Request) Do(ctx context.Context) (DataSlice, error) + func (r *Request) GetParameters() (map[string]interface{}, error) + func (r *Request) GetParametersJSON() ([]byte, error) + func (r *Request) GetParametersQuery() (url.Values, error) + func (r *Request) GetQueryParameters() (url.Values, error) + func (r *Request) GetSlugParameters() (map[string]interface{}, error) + func (r *Request) GetSlugsMap() (map[string]string, error) + func (r *Request) SetAsset(Asset string) *Request + func (r *Request) SetCategory(Category string) *Request + func (r *Request) SetCurrency(Currency string) *Request + func (r *Request) SetFormat(Format Format) *Request + func (r *Request) SetInterval(Interval Interval) *Request + func (r *Request) SetMetric(Metric string) *Request + func (r *Request) SetSince(Since time.Time) *Request + func (r *Request) SetTimestampFormat(TimestampFormat string) *Request + func (r *Request) SetUntil(Until time.Time) *Request + type RestClient struct + func NewRestClient() *RestClient + func (c *RestClient) Auth(apiKey string) + func (c *RestClient) NewAuthenticatedRequest(ctx context.Context, method, refURL string, params url.Values, ...) (*http.Request, error) + type Timestamp time.Time + func (t *Timestamp) UnmarshalJSON(o []byte) error + func (t Timestamp) String() string + func (t Timestamp) Unix() float64