currency

package
v0.0.0-...-eb4b608 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: Unlicense Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ApiUrl               = "https://api.frankfurter.app/latest?amount=%s&from=%s&to=%s"
	InlineQueryCacheTime = 3600
)

Variables

View Source
var (
	ErrBadAmount    = errors.New("bad amount")
	ErrBadCurrency  = errors.New("bad currency")
	ErrSameCurrency = errors.New("is same currency")
)

Functions

This section is empty.

Types

type Plugin

type Plugin struct{}

func New

func New() *Plugin

func (*Plugin) Commands

func (p *Plugin) Commands() []telebot.Command

func (*Plugin) Handlers

func (p *Plugin) Handlers(botInfo *telebot.User) []plugin.Handler

func (*Plugin) Name

func (p *Plugin) Name() string

type Response

type Response struct {
	Amount float64            `json:"amount"`
	Base   string             `json:"base"`
	Rates  map[string]float64 `json:"rates"`
}

Jump to

Keyboard shortcuts

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