Documentation ¶
Index ¶
- type Code
- type CodesRequest
- type CodesResponse
- type ConvertRequest
- type ConvertResponse
- type CurrencyService
- func (t *CurrencyService) Codes(request *CodesRequest) (*CodesResponse, error)
- func (t *CurrencyService) Convert(request *ConvertRequest) (*ConvertResponse, error)
- func (t *CurrencyService) History(request *HistoryRequest) (*HistoryResponse, error)
- func (t *CurrencyService) Rates(request *RatesRequest) (*RatesResponse, error)
- type HistoryRequest
- type HistoryResponse
- type RatesRequest
- type RatesResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CodesRequest ¶
type CodesRequest struct { }
type CodesResponse ¶
type CodesResponse struct {
Codes []Code `json:"codes"`
}
type ConvertRequest ¶
type ConvertResponse ¶
type CurrencyService ¶
type CurrencyService struct {
// contains filtered or unexported fields
}
func NewCurrencyService ¶
func NewCurrencyService(token string) *CurrencyService
func (*CurrencyService) Codes ¶
func (t *CurrencyService) Codes(request *CodesRequest) (*CodesResponse, error)
Codes returns the supported currency codes for the API
func (*CurrencyService) Convert ¶
func (t *CurrencyService) Convert(request *ConvertRequest) (*ConvertResponse, error)
Convert returns the currency conversion rate between two pairs e.g USD/GBP
func (*CurrencyService) History ¶
func (t *CurrencyService) History(request *HistoryRequest) (*HistoryResponse, error)
Returns the historic rates for a currency on a given date
func (*CurrencyService) Rates ¶
func (t *CurrencyService) Rates(request *RatesRequest) (*RatesResponse, error)
Rates returns the currency rates for a given code e.g USD
type HistoryRequest ¶
type HistoryResponse ¶
type RatesRequest ¶
type RatesRequest struct { // The currency code to get rates for e.g USD Code string `json:"code"` }
type RatesResponse ¶
Click to show internal directories.
Click to hide internal directories.