webapi

package
v0.0.0-...-753f795 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DateRange = 90

Variables

This section is empty.

Functions

This section is empty.

Types

type CbrWebAPI

type CbrWebAPI struct {
	// contains filtered or unexported fields
}

func New

func New() *CbrWebAPI

func (*CbrWebAPI) GetCurrencies

func (c *CbrWebAPI) GetCurrencies(dqs entity.DynamicQuotes) (entity.DynamicQuotes, error)

func (*CbrWebAPI) GetCurrencyDynamicQuote

func (c *CbrWebAPI) GetCurrencyDynamicQuote(dq entity.DynamicQuote) (entity.DynamicQuote, error)

type CurrenciesResp

type CurrenciesResp struct {
	XMLName xml.Name `xml:"Valuta"`
	Text    string   `xml:",chardata"`
	Name    string   `xml:"name,attr"`
	Items   []struct {
		Text        string `xml:",chardata"`
		ID          string `xml:"ID,attr"`
		Name        string `xml:"Name"`
		EngName     string `xml:"EngName"`
		Nominal     string `xml:"Nominal"`
		ParentCode  string `xml:"ParentCode"`
		ISONumCode  string `xml:"ISO_Num_Code"`
		ISOCharCode string `xml:"ISO_Char_Code"`
	} `xml:"Item"`
}

type CurrencyDynamicQuoteResp

type CurrencyDynamicQuoteResp struct {
	XMLName    xml.Name `xml:"ValCurs"`
	Text       string   `xml:",chardata"`
	ID         string   `xml:"ID,attr"`
	DateRange1 string   `xml:"DateRange1,attr"`
	DateRange2 string   `xml:"DateRange2,attr"`
	Name       string   `xml:"name,attr"`
	Records    []struct {
		Text    string `xml:",chardata"`
		Date    string `xml:"Date,attr"`
		ID      string `xml:"Id,attr"`
		Nominal string `xml:"Nominal"`
		Value   string `xml:"Value"`
	} `xml:"Record"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL