Documentation ¶
Index ¶
- type Client
- func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*Response, error)
- func (c *Client) GetGlobal(ctx context.Context, opt *GetGlobalOptions) (*Global, *Response, error)
- func (c *Client) GetTicker(ctx context.Context, id interface{}, opt *GetTickerOptions) (*Ticker, *Response, error)
- func (c *Client) ListTicker(ctx context.Context, opt *ListTickerOptions) (TickerList, *Response, error)
- func (c *Client) NewRequest(path string, opt interface{}) (*http.Request, error)
- type GetGlobalOptions
- type GetTickerOptions
- type Global
- type GlobalQuote
- type ListTickerOptions
- type Metadata
- type Response
- type Ticker
- type TickerList
- type TickerQuote
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) ListTicker ¶
func (c *Client) ListTicker(ctx context.Context, opt *ListTickerOptions) (TickerList, *Response, error)
type GetGlobalOptions ¶
type GetGlobalOptions struct {
Convert string `url:"convert,omitempty"`
}
type GetTickerOptions ¶
type GetTickerOptions struct {
Convert string `url:"convert,omitempty"`
}
type GlobalQuote ¶
type ListTickerOptions ¶
type Response ¶
type Response struct { Data interface{} `json:"data"` Metadata *Metadata `json:"metadata"` }
type Ticker ¶
type Ticker struct { ID int `json:"id"` Name string `json:"name"` Symbol string `json:"symbol"` WebsiteSlug string `json:"website_slug"` Rank int `json:"rank"` CirculatingSupply float32 `json:"circulating_supply"` TotalSupply float32 `json:"total_supply"` MaxSupply float32 `json:"max_supply"` Quotes map[string]TickerQuote `json:"quotes"` LastUpdated int `json:"last_updated"` }
type TickerList ¶
type TickerQuote ¶
type TickerQuote struct {
Price float64 `json:"price"`
}
Click to show internal directories.
Click to hide internal directories.