engine

package
v0.0.0-...-6215870 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_TICKER_INTERVAL = 5
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GameEngine

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

func GetEngine

func GetEngine(id string) *GameEngine

func NewGameEngine

func NewGameEngine(id string) *GameEngine

func (*GameEngine) GetPlayByPlay

func (e *GameEngine) GetPlayByPlay() *nag.PlayByPlayResponse

func (*GameEngine) InitPlayByPlayTracker

func (e *GameEngine) InitPlayByPlayTracker() nag.PlayByPlayResponse

type NBAEngine

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

type PlayByPlay

type PlayByPlay struct {
	Data PlayByPlayData
}

func New

func New(id string) *PlayByPlay

constructor

func (*PlayByPlay) Actions

func (p *PlayByPlay) Actions() []PlayByPlayAction

return the list of actions for the game

func (*PlayByPlay) Get

func (p *PlayByPlay) Get() error

populate data

func (*PlayByPlay) Refresh

func (p *PlayByPlay) Refresh(ms int)

type PlayByPlayAction

type PlayByPlayAction struct {
	ActionNumber            int       `json:"actionNumber"`
	ActionType              string    `json:"actionType"`
	Clock                   string    `json:"clock"`
	Desc                    string    `json:"description"`
	Edited                  time.Time `json:"edited"`
	IsFieldGoal             int       `json:"isFieldGoal"`
	IsTargetScoreLastPeriod bool      `json:"isTargetScoreLastPeriod"`
	OrderNumber             int       `json:"orderNumber"`
	Period                  int       `json:"period"`
	PeriodType              string    `json:"periodType"`
	PersonId                int       `json:"personId"`
	PersonIdsFilter         []int     `json:"personIdsFilter"`
	PlayerName              string    `json:"playerName"`
	PlayerNameI             string    `json:"playerNameI"`
	Possession              int       `json:"possession"`
	Qualifiers              []string  `json:"qualifiers"`
	ReboundDefensiveTotal   int       `json:"reboundDefensiveTotal"`
	ReboundOffensiveTotal   int       `json:"reboundOffensiveTotal"`
	ReboundTotal            int       `json:"reboundTotal"`
	ScoreAway               string    `json:"scoreAway"`
	ScoreHome               string    `json:"scoreHome"`
	ShotActionNumber        int       `json:"shotActionNumber"`
	Side                    string    `json:"side"`
	SubType                 string    `json:"subType"`
	TeamId                  int       `json:"teamId"`
	TeamTricode             string    `json:"teamTricode"`
	TimeActual              string    `json:"timeActual"`
}

type PlayByPlayData

type PlayByPlayData struct {
	Meta any            `json:"-"`
	Game PlayByPlayGame `json:"game"`
}

type PlayByPlayGame

type PlayByPlayGame struct {
	GameID  string             `json:"gameId"`
	Actions []PlayByPlayAction `json:"actions"`
}

Jump to

Keyboard shortcuts

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