espnracing

package
v0.0.95 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2022 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

API ...

func New

func New(leaguer Leaguer, log *zap.Logger) (*API, error)

New ...

func (a *API) GetLogo(ctx context.Context, matrixBounds image.Rectangle) (*logo.Logo, error)

GetLogo ...

func (*API) GetScheduledEvents

func (a *API) GetScheduledEvents(ctx context.Context) ([]*racingboard.Event, error)

GetScheduledEvents ...

func (*API) HTTPPathPrefix

func (a *API) HTTPPathPrefix() string

HTTPPathPrefix ...

func (*API) LeagueShortName

func (a *API) LeagueShortName() string

LeagueShortName ...

type F1

type F1 struct{}

F1 ...

func (*F1) APIPath

func (a *F1) APIPath() string

APIPath ...

func (*F1) HTTPPathPrefix

func (a *F1) HTTPPathPrefix() string

HTTPPathPrefix ...

func (*F1) LogoAsset

func (a *F1) LogoAsset() string

LogoAsset ...

func (*F1) LogoSourceURL

func (a *F1) LogoSourceURL() string

LogoSourceURL ...

func (*F1) ShortName

func (a *F1) ShortName() string

ShortName ...

type IRL

type IRL struct{}

IRL ...

func (*IRL) APIPath

func (a *IRL) APIPath() string

APIPath ...

func (*IRL) HTTPPathPrefix

func (a *IRL) HTTPPathPrefix() string

HTTPPathPrefix ...

func (*IRL) LogoAsset

func (a *IRL) LogoAsset() string

LogoAsset ...

func (*IRL) LogoSourceURL

func (a *IRL) LogoSourceURL() string

LogoSourceURL ...

func (*IRL) ShortName

func (a *IRL) ShortName() string

ShortName ...

type Leaguer

type Leaguer interface {
	ShortName() string
	LogoSourceURL() string
	HTTPPathPrefix() string
	APIPath() string
	LogoAsset() string
}

Leaguer ...

type Scoreboard

type Scoreboard struct {
	Leagues []*struct {
		ID           string `json:"id"`
		Abbreviation string `json:"abbreviation"`
		Slug         string `json:"slug"`
		Season       *struct {
			Year      int    `json:"year"`
			StartDate string `json:"startDate"`
			EndDate   string `json:"endDate"`
		} `json:"season"`
		Calender []*struct {
			Label     string `json:"label"`
			StartDate string `json:"startDate"`
			EndDate   string `json:"endDate"`
		} `json:"calendar"`
	} `json:"leagues"`
	Events []*struct {
		ID        string `json:"id"`
		Date      string `json:"date"`
		Name      string `json:"name"`
		ShortName string `json:"shortName"`
		Status    *struct {
			Name         string `json:"name"`
			State        string `json:"state"`
			Completed    bool   `json:"completed"`
			DisplayClock string `json:"displayClock"`
		} `json:"status"`
		Competitions []*struct {
			ID   string `json:"id"`
			Type *struct {
				ID           string `json:"id"`
				Abbreviation string `json:"abbreviation"`
			} `json:"type"`
			Status *struct {
				Name         string `json:"name"`
				State        string `json:"state"`
				Completed    bool   `json:"completed"`
				DisplayClock string `json:"displayClock"`
			} `json:"status"`
		}
	} `json:"events"`
}

Scoreboard ...

Jump to

Keyboard shortcuts

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