Documentation ¶
Index ¶
- Constants
- func TimeToGameDateStr(t time.Time) string
- type Conference
- type ESPNBoard
- func New(ctx context.Context, leaguer Leaguer, logger *zap.Logger, r rankSetter, ...) (*ESPNBoard, error)
- func NewEPL(ctx context.Context, logger *zap.Logger) (*ESPNBoard, error)
- func NewMLB(ctx context.Context, logger *zap.Logger, opts ...Option) (*ESPNBoard, error)
- func NewMLS(ctx context.Context, logger *zap.Logger) (*ESPNBoard, error)
- func NewNBA(ctx context.Context, logger *zap.Logger) (*ESPNBoard, error)
- func NewNCAAF(ctx context.Context, logger *zap.Logger) (*ESPNBoard, error)
- func NewNCAAMensBasketball(ctx context.Context, logger *zap.Logger) (*ESPNBoard, error)
- func NewNFL(ctx context.Context, logger *zap.Logger) (*ESPNBoard, error)
- func NewNHL(ctx context.Context, logger *zap.Logger) (*ESPNBoard, error)
- func (e *ESPNBoard) CacheClear(ctx context.Context)
- func (e *ESPNBoard) DateStr(d time.Time) string
- func (e *ESPNBoard) GetGames(ctx context.Context, dateStr string) ([]*Game, error)
- func (e *ESPNBoard) GetLogo(ctx context.Context, logoKey string, logoConf *logo.Config, ...) (*logo.Logo, error)
- func (e *ESPNBoard) GetLogoSource(ctx context.Context, teamID string, logoURLSearch string) (image.Image, error)
- func (e *ESPNBoard) GetScheduledGames(ctx context.Context, dates []time.Time) ([]sportboard.Game, error)
- func (e *ESPNBoard) GetTeams(ctx context.Context) ([]sportboard.Team, error)
- func (e *ESPNBoard) GetWatchTeams(teams []string, season string) []string
- func (e *ESPNBoard) HTTPPathPrefix() string
- func (e *ESPNBoard) League() string
- func (e *ESPNBoard) TeamFromID(ctx context.Context, id string) (sportboard.Team, error)
- func (e *ESPNBoard) TeamRank(ctx context.Context, team sportboard.Team, season string) string
- func (e *ESPNBoard) TeamRecord(ctx context.Context, team sportboard.Team, season string) string
- func (e *ESPNBoard) TeamsInConference(conference string) []*Team
- func (e *ESPNBoard) UpdateGames(ctx context.Context, dateStr string) error
- type Game
- func (g *Game) AwayAbbrev() string
- func (g *Game) AwayColor() (*color.RGBA, *color.RGBA, error)
- func (g *Game) AwayTeam() (sportboard.Team, error)
- func (g *Game) GetAwayScore(ctx context.Context) (int, error)
- func (g *Game) GetClock() (string, error)
- func (g *Game) GetCount(ctx context.Context) (string, error)
- func (g *Game) GetHomeScore(ctx context.Context) (int, error)
- func (g *Game) GetID() int
- func (g *Game) GetInningState(ctx context.Context) (*mlblive.InningState, error)
- func (g *Game) GetLink() (string, error)
- func (g *Game) GetOdds() (string, string, error)
- func (g *Game) GetQuarter() (string, error)
- func (g *Game) GetRunners(ctx context.Context) (*mlblive.Runners, error)
- func (g *Game) GetStartTime(ctx context.Context) (time.Time, error)
- func (g *Game) GetUpdate(ctx context.Context) (sportboard.Game, error)
- func (g *Game) HomeAbbrev() string
- func (g *Game) HomeColor() (*color.RGBA, *color.RGBA, error)
- func (g *Game) HomeTeam() (sportboard.Team, error)
- func (g *Game) IsComplete() (bool, error)
- func (g *Game) IsLive() (bool, error)
- func (g *Game) IsPostponed() (bool, error)
- type Headlines
- type Leaguer
- type Logo
- type Odds
- type Option
- type Team
Constants ¶
View Source
const DateFormat = "20060102"
DateFormat for getting games
Variables ¶
This section is empty.
Functions ¶
func TimeToGameDateStr ¶
TimeToGameDateStr converts a time.Time into the date string format the API expects
Types ¶
type ESPNBoard ¶
ESPNBoard ...
func New ¶
func New(ctx context.Context, leaguer Leaguer, logger *zap.Logger, r rankSetter, rec rankSetter, opts ...Option) (*ESPNBoard, error)
New ...
func NewNCAAMensBasketball ¶
NewNCAAMensBasketball ...
func (*ESPNBoard) GetLogo ¶
func (e *ESPNBoard) GetLogo(ctx context.Context, logoKey string, logoConf *logo.Config, bounds image.Rectangle) (*logo.Logo, error)
GetLogo ...
func (*ESPNBoard) GetLogoSource ¶
func (e *ESPNBoard) GetLogoSource(ctx context.Context, teamID string, logoURLSearch string) (image.Image, error)
GetLogoSource ...
func (*ESPNBoard) GetScheduledGames ¶
func (e *ESPNBoard) GetScheduledGames(ctx context.Context, dates []time.Time) ([]sportboard.Game, error)
GetScheduledGames ...
func (*ESPNBoard) GetWatchTeams ¶
GetWatchTeams returns a list of team ID's
func (*ESPNBoard) TeamFromID ¶
TeamFromID ...
func (*ESPNBoard) TeamRecord ¶
TeamRecord ...
func (*ESPNBoard) TeamsInConference ¶
TeamsInConference ...
type Game ¶
type Game struct { ID string Home *Team Away *Team GameTime time.Time Situation *baseballSituation // contains filtered or unexported fields }
Game ...
func (*Game) AwayAbbrev ¶
func (*Game) GetInningState ¶
func (*Game) GetStartTime ¶
GetStartTime ...
func (*Game) HomeAbbrev ¶
type Headlines ¶
Headlines ...
func NewHeadlines ¶
NewHeadlines ...
type Leaguer ¶
type Leaguer interface { League() string APIPath() string TeamEndpoints() []string HTTPPathPrefix() string HeadlinePath() string }
Leaguer ...
type Odds ¶
type Odds struct { Provider *struct { ID string `json:"id"` Name string `json:"name"` Priority int `json:"priority"` } `json:"provider"` Details string `json:"details"` OverUnder float64 `json:"overUnder"` }
Odds represents a game's betting odds
type Team ¶
type Team struct { ID string `json:"id"` Name string `json:"name"` DisplayName string `json:"displayName"` Abbreviation string `json:"abbreviation"` Color string `json:"color"` AlternateColor string `json:"alternateColor"` Logos []*Logo `json:"logos"` Points string `json:"score"` LogoURL string `json:"logo"` Conference *Conference IsHome bool sync.Mutex // contains filtered or unexported fields }
Team implements sportboard.Team
Click to show internal directories.
Click to hide internal directories.