covid

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: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BaseUrl       = "https://disease.sh/v3/covid-19"
	MyCountry     = "Germany" // Country that will definitely be shown in the top list
	TopListPlaces = 10
)

Variables

This section is empty.

Functions

func OnCountry

func OnCountry(c plugin.GobotContext) error

func OnRun

func OnRun(c plugin.GobotContext) error

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 (*Plugin) Name() string

type Result

type Result struct {
	Message                string  `json:"message"`
	Updated                int64   `json:"updated"`
	Cases                  int     `json:"cases"`
	TodayCases             int     `json:"todayCases"`
	Deaths                 int     `json:"deaths"`
	TodayDeaths            int     `json:"todayDeaths"`
	Recovered              int     `json:"recovered"`
	TodayRecovered         int     `json:"todayRecovered"`
	Active                 int     `json:"active"`
	Critical               int     `json:"critical"`
	CasesPerOneMillion     int     `json:"casesPerOneMillion"`
	Tests                  int     `json:"tests"`
	TestsPerOneMillion     float64 `json:"testsPerOneMillion"`
	Population             int     `json:"population"`
	OneCasePerPeople       int     `json:"oneCasePerPeople"`
	OneDeathPerPeople      int     `json:"oneDeathPerPeople"`
	OneTestPerPeople       int     `json:"oneTestPerPeople"`
	ActivePerOneMillion    float64 `json:"activePerOneMillion"`
	RecoveredPerOneMillion float64 `json:"recoveredPerOneMillion"`
	CriticalPerOneMillion  float64 `json:"criticalPerOneMillion"`
}

func (*Result) UpdatedParsed

func (result *Result) UpdatedParsed() time.Time

Jump to

Keyboard shortcuts

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