currency

package
v0.0.0-...-e7fbf99 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2020 License: GPL-3.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCurrency

func GetCurrency(ctx *bot.Context) (response string)

GetCurrency returns string of parsed currency data

Types

type Currency

type Currency struct {
	ID       string
	NumCode  string
	CharCode string
	Nominal  int
	Name     string
	Value    float32
	Previous float32
}

Currency structure

type Data

type Data struct {
	Date         string              `json:"Date"`
	PreviousDate string              `json:"PreviousDate"`
	PreviousURL  string              `json:"PreviousURL"`
	Timestamp    string              `json:"Timestamp"`
	Currencies   map[string]Currency `json:"Valute"`
}

Data currency structure

func (*Data) CurrencyCheck

func (d *Data) CurrencyCheck(currency string) bool

CurrencyCheck returns true if currency is real

Jump to

Keyboard shortcuts

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