football

package
v0.0.0-...-9c5270f Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(apiKey string) *Client

type LeagueFixtuers

type LeagueFixtuers struct {
	Matches []Matches `json:"matches"`
}

type LeagueStandings

type LeagueStandings struct {
	Standings []struct {
		Table []Table `json:"table"`
	} `json:"standings"`
}

type Matches

type Matches struct {
	AwayTeam Team   `json:"awayTeam"`
	HomeTeam Team   `json:"homeTeam"`
	Score    Score  `json:"score"`
	Stage    string `json:"stage"`
	Status   string `json:"status"`
	Date     string `json:"utcDate"`
}

type Score

type Score struct {
	FullTime ScoreByTime `json:"fullTime"`
	HalfTime ScoreByTime `json:"halfTime"`
	Winner   string      `json:"winner"`
}

type ScoreByTime

type ScoreByTime struct {
	AwayTeam int `json:"awayTeam"`
	HomeTeam int `json:"homeTeam"`
}

type Settings

type Settings struct {
	*cfg.Common
	// contains filtered or unexported fields
}

func NewSettingsFromYAML

func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings

type Table

type Table struct {
	Draw           int  `json:"draw"`
	GoalDifference int  `json:"goalDifference"`
	Lost           int  `json:"lost"`
	Won            int  `json:"won"`
	PlayedGames    int  `json:"playedGames"`
	Points         int  `json:"points"`
	Position       int  `json:"position"`
	Team           Team `json:"team"`
}

type Team

type Team struct {
	Name string `json:"name"`
}

type Widget

type Widget struct {
	view.TextWidget
	*Client

	League leagueInfo
	// contains filtered or unexported fields
}

func NewWidget

func NewWidget(tviewApp *tview.Application, redrawChan chan bool, pages *tview.Pages, settings *Settings) *Widget

func (*Widget) GetMatches

func (widget *Widget) GetMatches(leagueId int) string

GetMatches of particular league

func (*Widget) GetStandings

func (widget *Widget) GetStandings(leagueId int) string

GetStandings of particular league

func (*Widget) Refresh

func (widget *Widget) Refresh()

Jump to

Keyboard shortcuts

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