playbyplay

package
v0.0.0-...-5888283 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PlayByPlayUpdate

type PlayByPlayUpdate struct {
	NBAGameID            string
	NBATeamID            string
	NBAPlayerID          int
	SecondaryNBAPlayerID *int
	Period               int
	ActionNumber         int
}

type PlayByPlayWriter

type PlayByPlayWriter interface {
	UpdatePlayByPlays(ctx context.Context, playByPlayUpdates []PlayByPlayUpdate) ([]api.PlayByPlay, error)
}

type Service

type Service interface {
	FetchPlayByPlayForGame(ctx context.Context, logger *slog.Logger, gameID string) (nba.PlayByPlay, error)
	UpdatePlayByPlayForGames(ctx context.Context, logger *slog.Logger, nbaGameIDs []string) ([]api.PlayByPlay, error)
}

func NewService

func NewService(nbaClient nba.Client, r2Client cloudflare.Client, playByPlayStore PlayByPlayWriter) Service

Jump to

Keyboard shortcuts

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