playbyplay

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: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SearchBoxStyle = lipgloss.NewStyle()

	VERBOSE_VIEW_COLUMNS = []table.Column{
		table.NewFlexColumn("#", "#", 1),
		table.NewFlexColumn("PERIOD", "PERIOD", 1),
		table.NewFlexColumn("CLOCK", "CLOCK", 1),
		table.NewFlexColumn("SCORE", "SCORE", 1),
		table.NewFlexColumn("TYPE", "TYPE", 1).WithFiltered(true),
		table.NewFlexColumn("TEAM", "TEAM", 1).WithFiltered(true),
		table.NewFlexColumn("PLAYER", "PLAYER", 2).WithFiltered(true),
		table.NewFlexColumn("DESCRIPTION", "DESCRIPTION", 5).WithFiltered(true),
	}

	DEFAULT_VIEW_COLUMNS = []table.Column{
		table.NewFlexColumn("PERIOD", "PERIOD", 1),
		table.NewFlexColumn("CLOCK", "CLOCK", 1),
		table.NewFlexColumn("SCORE", "SCORE", 1),
		table.NewFlexColumn("TYPE", "TYPE", 1).WithFiltered(true),
		table.NewFlexColumn("TEAM", "TEAM", 1).WithFiltered(true),
		table.NewFlexColumn("PLAYER", "PLAYER", 2).WithFiltered(true),
		table.NewFlexColumn("DESCRIPTION", "DESCRIPTION", 4).WithFiltered(true),
	}

	CURRENT_VIEW_COLUMNS = DEFAULT_VIEW_COLUMNS

	DEFAULT_UPDATE_INTERVAL_SECS = 5

	IN_SEARCH bool

	TOGGLE_MAP = map[string]bool{}
)

Functions

func GetPlayByPlayActions

func GetPlayByPlayActions(id string) []nag.PlayByPlayAction

Types

type PlayByPlay

type PlayByPlay struct {
	Data  PlayByPlayData
	Model *PlayByPlayModel
}

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"`
}

type PlayByPlayItem

type PlayByPlayItem struct {
	PlayByPlayAction
}

type PlayByPlayModel

type PlayByPlayModel struct {
	base.BaseModel
	Table                 table.Model
	Rows                  []table.Row
	PrevModel             base.BaseModel
	Help                  help.Model
	Width, Height, Margin int
	HorizontalMargin      int
	VerticalMargin        int
	// contains filtered or unexported fields
}

func GetPlayByPlayModel

func GetPlayByPlayModel(id string) *PlayByPlayModel

populate data

func (PlayByPlayModel) Init

func (m PlayByPlayModel) Init() tea.Cmd

func (*PlayByPlayModel) RecalculateTable

func (p *PlayByPlayModel) RecalculateTable()

func (PlayByPlayModel) Reverse

func (m PlayByPlayModel) Reverse() tea.Cmd

func (*PlayByPlayModel) SetPreviousModel

func (p *PlayByPlayModel) SetPreviousModel(t base.BaseModel)

func (*PlayByPlayModel) SetRows

func (p *PlayByPlayModel) SetRows(rows []table.Row)

func (*PlayByPlayModel) SetTable

func (p *PlayByPlayModel) SetTable(t table.Model)

func (PlayByPlayModel) Update

func (m PlayByPlayModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (PlayByPlayModel) View

func (m PlayByPlayModel) View() string

type RefreshActionsEvent

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

Jump to

Keyboard shortcuts

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