rates

package
v0.0.0-...-834dd92 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Endpoint is the url where theuniversity provide the table
	Endpoint string = "https://portal.lancaster.ac.uk/intranet/api/content/cms/coronavirus/covid-19-statistics"
	//DatabasePath is file path for sqlite db
	DatabasePath string = "./database/cases.db"
)

Variables

This section is empty.

Functions

func Scrape

func Scrape(write bool, updateExisting bool) error

Scrape gets all the data from the table given out by the university.

Types

type ResponseContent

type ResponseContent struct {
	Title    string `json:"title"`
	Abstract string `json:"abstract`
	Content  string `json:"main"`
}

type WebResponse

type WebResponse struct {
	Key     string            `json:"key"`
	Title   string            `json:"title"`
	Content []ResponseContent `json:"contentItems"`
}

Jump to

Keyboard shortcuts

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