Documentation
¶
Index ¶
- Constants
- func GetBoxscoreData(date string, gameId string) map[string]interface{}
- func GetMockServer(t *testing.T) *httptest.Server
- func GetPlayersData(year string) map[string]interface{}
- func GetScoreboardData(date string) map[string]interface{}
- func GetTeamsData(year string) map[string]interface{}
- type Boxscore
- type Game
- type Player
- type Position
- type Stats
- type Team
Constants ¶
const NBA_DATA_ENDPOINT = "https://data.nba.net/data/10s/prod/v1"
Variables ¶
This section is empty.
Functions ¶
func GetBoxscoreData ¶
GetBoxscoreData returns the boxscore from a given date and game identifier
func GetMockServer ¶
GetMockServer initializes the mock responses when calling data api
func GetPlayersData ¶ added in v1.1.0
GetPlayersData returns the list of players for a given season (year)
func GetScoreboardData ¶
GetScoreboardData returns the scoreboard from a given date
func GetTeamsData ¶ added in v1.1.0
GetTeamsData returns the list of players for a given season (year)
Types ¶
type Boxscore ¶
Boxscore represents the boxscore of a game
func GetBoxscore ¶
GetBoxscore returns the boxscore of a game between two teams that was played from a given date
func GetBoxscores ¶
GetBoxscores returns the list of boxscores that was played from a given date
type Player ¶
Player represents the player information
func GetPlayers ¶ added in v1.1.0
GetPlayers returns the list of players in a given season (ex 2021 for season 2021/2022)
type Stats ¶
type Stats struct {
PlayerID string
FirstName string
LastName string
TeamID string
Points int
Rebounds int
Assists int
Blocks int
Steals int
Turnovers int
Fouls int
FGM int // Field goal made
FGA int // Field goal attempted
TPM int // Three points made
TPA int // Three points attempted
FTM int // Free throw made
FTA int // Free throw attempted
}
Stats represents the statistics of a player