Documentation
¶
Index ¶
- func SortByScore(players []statboard.Player) []statboard.Player
- type PGA
- func (p *PGA) AvailableStats(ctx context.Context, playerCategory string) ([]string, error)
- func (p *PGA) FindPlayer(ctx context.Context, firstName string, lastName string) (statboard.Player, error)
- func (p *PGA) GetPlayer(ctx context.Context, id string) (statboard.Player, error)
- func (p *PGA) HTTPPathPrefix() string
- func (p *PGA) LeagueShortName() string
- func (p *PGA) ListPlayers(ctx context.Context, teamAbbreviation string) ([]statboard.Player, error)
- func (p *PGA) PlayerCategories() []string
- func (p *PGA) StatShortName(stat string) string
- type Player
- func (p *Player) FirstName() string
- func (p *Player) GetCategory() string
- func (p *Player) GetStat(stat string) string
- func (p *Player) LastName() string
- func (p *Player) Position() string
- func (p *Player) PrefixCol() string
- func (p *Player) StatColor(stat string) color.Color
- func (p *Player) UpdateStats(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PGA ¶
PGA ...
func (*PGA) AvailableStats ¶
AvailableStats ...
func (*PGA) FindPlayer ¶
func (p *PGA) FindPlayer(ctx context.Context, firstName string, lastName string) (statboard.Player, error)
FindPlayer ...
func (*PGA) ListPlayers ¶
ListPlayers ...
type Player ¶
type Player struct {
ID string `json:"id"`
Athlete athlete `json:"athlete"`
Team *athlete `json:"team"`
Status struct {
TeeTime string `json:"teeTime"`
Hole int `json:"hole"`
Thru int `json:"thru"`
Position struct {
DisplayName string `json:"displayName"`
ID string `json:"id"`
}
} `json:"status"`
Score struct {
DisplayValue string `json:"displayValue"`
} `json:"score"`
SortOrder int `json:"sortOrder"`
Statistics []*struct {
Name string `json:"name"`
DisplayValue string `json:"displayValue"`
} `json:"statistics"`
}
Player ...
Click to show internal directories.
Click to hide internal directories.