webAPI

package
v0.0.0-...-b401549 Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	URL = "https://db.chgk.info/xml/random/types1/complexity2"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type QuestionDTO

type QuestionDTO struct {
	XMLName             xml.Name `xml:"question"`
	TourFileName        string   `xml:"tourFileName"`
	TournamentFileName  string   `xml:"tournamentFileName"`
	QuestionID          string   `xml:"QuestionId"`
	ParentID            string   `xml:"ParentId"`
	Number              int      `xml:"Number"`
	Type                string   `xml:"Type"`
	TypeNum             int      `xml:"TypeNum"`
	TextID              string   `xml:"TextId"`
	Question            string   `xml:"Question"`
	Answer              string   `xml:"Answer"`
	PassCriteria        string   `xml:"PassCriteria"`
	Authors             string   `xml:"Authors"`
	Sources             string   `xml:"Sources"`
	Comments            string   `xml:"Comments"`
	Rating              string   `xml:"Rating"`
	RatingNumber        string   `xml:"RatingNumber"`
	Complexity          string   `xml:"Complexity"`
	Topic               string   `xml:"Topic"`
	ProcessedBySearch   string   `xml:"ProcessedBySearch"`
	ParentTextID        string   `xml:"parent_text_id,ParentTextId"`
	TourID              string   `xml:"tourId"`
	TournamentID        string   `xml:"tournamentId"`
	TourTitle           string   `xml:"tourTitle"`
	TournamentTitle     string   `xml:"tournamentTitle"`
	TourType            string   `xml:"tourType"`
	TournamentType      string   `xml:"tournamentType"`
	TourPlayedAt        string   `xml:"tourPlayedAt"`
	TournamentPlayedAt  string   `xml:"tournamentPlayedAt"`
	TourPlayedAt2       string   `xml:"tourPlayedAt2"`
	TournamentPlayedAt2 string   `xml:"tournamentPlayedAt2"`
	Notices             string   `xml:"Notices"`
}

type QuestionWebAPI

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

func New

func New(logger *slog.Logger) *QuestionWebAPI

func (*QuestionWebAPI) GetAllQuestions

func (w *QuestionWebAPI) GetAllQuestions() ([]*models.Question, error)

func (*QuestionWebAPI) GetOneQuestion

func (w *QuestionWebAPI) GetOneQuestion() (*models.Question, error)

type SearchDTO

type SearchDTO struct {
	XMLName   xml.Name      `xml:"search"`
	Questions []QuestionDTO `xml:"question"`
}

Jump to

Keyboard shortcuts

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