ScoreBoard - basketballrelativity/py_ball GitHub Wiki
This section details all endpoints accessible via the ScoreBoard
class in scoreboard.py. Endpoints available include:
Endpoint | Description | Tables |
---|---|---|
scoreboard | Live scores across the league, with series metadata and standings information | 'GameHeader', 'LineScore', 'SeriesStandings', 'LastMeeting', 'EastConfStandingsByDay', 'WestConfStandingsByDay', 'Available' |
scoreboardv2 | Live scores across the league, with series metadata and standings information. Also, scoreboardv2 has ticket, win probability, and team leader information | 'GameHeader', 'LineScore', 'SeriesStandings', 'LastMeeting', 'EastConfStandingsByDay', 'WestConfStandingsByDay', 'Available', 'TeamLeaders', 'TicketLinks', 'WinProbability' |
Parameters
The ScoreBoard
endpoints require the corresponding parameters below:
API Param | Class Param | Definition | Valid Values | Required |
---|---|---|---|---|
LeagueID | league_id | String of a two-digit number corresponding to the league. '00' is the NBA, '10' is the WNBA, '01' is the ABA, and '20' is the G-League | '00', '01', '10', '20' | All |
GameDate | game_date | String of a date formatted as 'MM/DD/YYYY' representing the date for which data is desired | 'MM/DD/YYYY' | All |
DayOffset | day_offset | String of an integer representing days from or before the date given in game_date for which data is desired. Positive values indicate days into the future, zero represents the current day, and negative values indicate days into the past | Integers | All |
Features
The following table contains features returned in each table from all endpoints.
Column | Definition | Endpoint/Table |
---|---|---|
ARENA_NAME | Name of arena | scoreboardv2/GameHeader |
AST | Assists | scoreboard/LineScore, scoreboardv2/LineScore, scoreboardv2/TeamLeaders |
AST_PLAYER_ID | Unique identifier of team assists leader | scoreboardv2/TeamLeaders |
AST_PLAYER_NAME | First and last name of team assists leader | scoreboardv2/TeamLeaders |
AWAY_TV_BROADCASTER_ABBREVIATION | Abbreviated away TV broadcaster name | scoreboardv2/GameHeader |
CONFERENCE | Conference (East or West) | scoreboard/EastConfStandingsByDay, scoreboard/WestConfStandingsByDay, scoreboardv2/EastConfStandingsByDay, scoreboardv2/WestConfStandingsByDay |
FG3_PCT | Three-point field goal percentage | scoreboard/LineScore, scoreboardv2/LineScore |
FG_PCT | Field goal percentage | scoreboard/LineScore, scoreboardv2/LineScore |
FT_PCT | Free throw percentage | scoreboard/LineScore, scoreboardv2/LineScore |
G | Games | scoreboard/EastConfStandingsByDay, scoreboard/WestConfStandingsByDay, scoreboardv2/EastConfStandingsByDay, scoreboardv2/WestConfStandingsByDay |
GAMECODE | Unique game identifier | scoreboard/GameHeader, scoreboardv2/GameHeader |
GAME_DATE_EST | Game date in YYYY-MM-DD format | scoreboard/GameHeader, scoreboard/LineScore, scoreboard/SeriesStandings, scoreboardv2/GameHeader, scoreboardv2/LineScore, scoreboardv2/SeriesStandings |
GAME_ID | Unique game identifier | scoreboard/GameHeader, scoreboard/LineScore, scoreboard/SeriesStandings, scoreboard/LastMeeting, scoreboard/Available, scoreboardv2/GameHeader, scoreboardv2/LineScore, scoreboardv2/SeriesStandings, scoreboardv2/LastMeeting, scoreboardv2/Available, scoreboardv2/TeamLeaders, scoreboardv2/TickerLinks |
GAME_SEQUENCE | scoreboard/GameHeader, scoreboard/LineScore, scoreboardv2/GameHeader, scoreboardv2/LineScore | |
GAME_STATUS_ID | Unique game status identifier | scoreboard/GameHeader, scoreboardv2/GameHeader |
GAME_STATUS_TEXT | Unique game status text | scoreboard/GameHeader, scoreboardv2/GameHeader |
HOME_TEAM_ID | Unique identifier of the home team | scoreboard/GameHeader, scoreboard/SeriesStandings, scoreboardv2/GameHeader, scoreboardv2/SeriesStandings |
HOME_TEAM_LOSSES | Number of home team losses | scoreboard/SeriesStandings, scoreboardv2/SeriesStandings |
HOME_TEAM_WINS | Number of home team wins | scoreboard/SeriesStandings, scoreboardv2/SeriesStandings |
HOME_TV_BROADCASTER_ABBREVIATION | Abbreviated home TV broadcaster name | scoreboardv2/GameHeader |
HOME_RECORD | Record of home team in W-L format | scoreboard/EastConfStandingsByDay, scoreboard/WestConfStandingsByDay, scoreboardv2/EastConfStandingsByDay, scoreboardv2/WestConfStandingsByDay |
L | Losses | scoreboard/EastConfStandingsByDay, scoreboard/WestConfStandingsByDay, scoreboardv2/EastConfStandingsByDay, scoreboardv2/WestConfStandingsByDay |
LAST_GAME_DATE_EST | Last dame date in YYYY-MM-DD format | scoreboard/LastMeeting, scoreboardv2/LastMeeting |
LAST_GAME_HOME_TEAM_ABBREVIATION | Abbreviated previous home team identifier | scoreboard/LastMeeting, scoreboardv2/LastMeeting |
LAST_GAME_HOME_TEAM_CITY | Previous home team city | scoreboard/LastMeeting, scoreboardv2/LastMeeting |
LAST_GAME_HOME_TEAM_ID | Previous unique home team identifier | scoreboard/LastMeeting, scoreboardv2/LastMeeting |
LAST_GAME_HOME_TEAM_NAME | Previous home team name | scoreboard/LastMeeting, scoreboardv2/LastMeeting |
LAST_GAME_HOME_TEAM_POINTS | Previous home team points | scoreboard/LastMeeting, scoreboardv2/LastMeeting |
LAST_GAME_ID | Previous unique game identifier | scoreboard/LastMeeting, scoreboardv2/LastMeeting |
LAST_GAME_VISITOR_TEAM_CITY | Previous visiting team city | scoreboard/LastMeeting, scoreboardv2/LastMeeting |
LAST_GAME_VISITOR_TEAM_CITY1 | Previous visiting team city | scoreboard/LastMeeting, scoreboardv2/LastMeeting |
LAST_GAME_VISITOR_TEAM_ID | Previous unique visiting team identifier | scoreboard/LastMeeting, scoreboardv2/LastMeeting |
LAST_GAME_VISITOR_TEAM_NAME | Previous visiting team name | scoreboard/LastMeeting, scoreboardv2/LastMeeting |
LAST_GAME_VISITOR_TEAM_POINTS | Previous visiting team points | scoreboard/LastMeeting, scoreboardv2/LastMeeting |
LEAG_TIX | URL for ticket purchases | scoreboardv2/TickerLinks |
LEAGUE_ID | Unique league identifier | scoreboard/EastConfStandingsByDay, scoreboard/WestConfStandingsByDay, scoreboardv2/EastConfStandingsByDay, scoreboardv2/WestConfStandingsByDay |
LIVE_PC_TIME | Current game time | scoreboard/GameHeader, scoreboardv2/GameHeader |
LIVE_PERIOD | Current game period | scoreboard/GameHeader, scoreboardv2/GameHeader |
LIVE_PERIOD_TIME_BCAST | Current game period, time, and broadcast | scoreboard/GameHeader, scoreboardv2/GameHeader |
NATL_TV_BROADCASTER_ABBREVIATION | TV broadcaster abbreviation | scoreboard/GameHeader, scoreboardv2/GameHeader |
PT_AVAILABLE | Boolean flag indicating if results information is available | scoreboard/Available, scoreboardv2/Available |
PTS | Points scored | scoreboard/LineScore, scoreboardv2/LineScore, scoreboardv2/TeamLeaders |
PTS_OT1 | Points scored in the first overtime period | scoreboard/LineScore, scoreboardv2/LineScore |
PTS_OT10 | Points scored in the tenth overtime period | scoreboard/LineScore, scoreboardv2/LineScore |
PTS_OT2 | Points scored in the second overtime period | scoreboard/LineScore, scoreboardv2/LineScore |
PTS_OT3 | Points scored in the third overtime period | scoreboard/LineScore, scoreboardv2/LineScore |
PTS_OT4 | Points scored in the fourth overtime period | scoreboard/LineScore, scoreboardv2/LineScore |
PTS_OT5 | Points scored in the fifth overtime period | scoreboard/LineScore, scoreboardv2/LineScore |
PTS_OT6 | Points scored in the sixth overtime period | scoreboard/LineScore, scoreboardv2/LineScore |
PTS_OT7 | Points scored in the seventh overtime period | scoreboard/LineScore, scoreboardv2/LineScore |
PTS_OT8 | Points scored in the eighth overtime period | scoreboard/LineScore, scoreboardv2/LineScore |
PTS_OT9 | Points scored in the ninth overtime period | scoreboard/LineScore, scoreboardv2/LineScore |
PTS_PLAYER_ID | Unique identifier of team points leader | scoreboardv2/TeamLeaders |
PTS_PLAYER_NAME | First and last name of team points leader | scoreboardv2/TeamLeaders |
PTS_QTR1 | Points scored in the first quarter | scoreboard/LineScore, scoreboardv2/LineScore |
PTS_QTR2 | Points scored in the second quarter | scoreboard/LineScore, scoreboardv2/LineScore |
PTS_QTR3 | Points scored in the third quarter | scoreboard/LineScore, scoreboardv2/LineScore |
PTS_QTR4 | Points scored in the fourth quarter | scoreboard/LineScore, scoreboardv2/LineScore |
REB | Rebounds | scoreboard/LineScore, scoreboardv2/LineScore, scoreboardv2/TeamLeaders |
REB_PLAYER_ID | Unique identifier of team rebounds leader | scoreboardv2/TeamLeaders |
REB_PLAYER_NAME | First and last name of team rebounds leader | scoreboardv2/TeamLeaders |
ROAD_RECORD | Record of road team in W-L format | scoreboard/EastConfStandingsByDay, scoreboard/WestConfStandingsByDay, scoreboardv2/EastConfStandingsByDay, scoreboardv2/WestConfStandingsByDay |
SEASON | Current season | scoreboard/GameHeader, scoreboardv2/GameHeader |
SEASON_ID | Unique season identifier | scoreboard/EastConfStandingsByDay, scoreboard/WestConfStandingsByDay, scoreboardv2/EastConfStandingsByDay, scoreboardv2/WestConfStandingsByDay |
SERIES_LEADER | Team city of series leader | scoreboard/SeriesStandings, scoreboardv2/SeriesStandings |
STANDINGSDATE | Standings as of date | scoreboard/EastConfStandingsByDay, scoreboard/WestConfStandingsByDay, scoreboardv2/EastConfStandingsByDay, scoreboardv2/WestConfStandingsByDay |
TEAM | Team name | scoreboard/EastConfStandingsByDay, scoreboard/WestConfStandingsByDay, scoreboardv2/EastConfStandingsByDay, scoreboardv2/WestConfStandingsByDay |
TEAM_ABBREVIATION | Abbreviated team identifier | scoreboard/LineScore, scoreboardv2/LineScore, scoreboardv2/TeamLeaders |
TEAM_CITY | Team city | scoreboardv2/TeamLeaders |
TEAM_CITY_NAME | Team city | scoreboard/LineScore, scoreboardv2/LineScore |
TEAM_ID | Unique team identifier | scoreboard/LineScore, scoreboard/EastConfStandingsByDay, scoreboard/WestConfStandingsByDay, scoreboardv2/LineScore, scoreboardv2/EastConfStandingsByDay, scoreboardv2/WestConfStandingsByDay, scoreboardv2/TeamLeaders |
TEAM_NAME | Team name | scoreboardv2/LineScore |
TEAM_NICKNAME | Team name | scoreboardv2/TeamLeaders |
TEAM_WINS_LOSSES | Team W-L record | scoreboard/LineScore, scoreboardv2/LineScore |
TOV | Turnovers | scoreboard/LineScore, scoreboardv2/LineScore |
VISITOR_TEAM_ID | Unique identifier of the visiting team | scoreboard/GameHeader, scoreboard/SeriesStandings, scoreboardv2/GameHeader, scoreboardv2/SeriesStandings |
W | Wins | scoreboard/EastConfStandingsByDay, scoreboard/WestConfStandingsByDay, scoreboardv2/EastConfStandingsByDay, scoreboardv2/WestConfStandingsByDay |
WH_STATUS | scoreboard/GameHeader, scoreboardv2/GameHeader | |
W_PCT | Winning percentage | scoreboard/EastConfStandingsByDay, scoreboard/WestConfStandingsByDay, scoreboardv2/EastConfStandingsByDay, scoreboardv2/WestConfStandingsByDay |