swar / nba_api

An API Client package to access the APIs for NBA.com
MIT License
2.5k stars 534 forks source link

all possible values of ['gameStatusText'] in live scoreboard.Scoreboard()? #397

Open owqejfb opened 1 year ago

owqejfb commented 1 year ago

example below

from nba_api.live.nba.endpoints import scoreboard
live_scoreboard = scoreboard.ScoreBoard()
board = live_scoreboard.get_dict()
for game in board['scoreboard']['games']:
    print(game['gameStatusText'])

this will return the gameStatusText of all games that are played on the current day. What are all the possible values that can exist here?

I have found the following

'9:00 pm ET' (the start time when the game has yet to start) 'Q1 12:34' (the quarter and time left in the quarter when there is more than 1:00 left) 'Q1 12.3' (the quarter and time left in the quarter when there is less than 1:00 left) 'Q1' (the quarter that just finished) 'FINAL' (Game finished) 'FINAL/OT' (game finished and went to 1OT (not sure what happens in 2OT+))

Is anyone aware of any more values that are possible? Specifically what is said during halftime or in multiple OTs? Does Q2 == halftime or is there a 'HALFTIME' string, ended having a bug when parsing a timestamp when under a minute because the format below a minute is different than above, M:s vs. S:mS.

If we can get an exhaustive list I believe it would be helpful to document this in the code so people are aware of what values can be expected. The way 'gameStatusText' is, means you have to do manual parsing to figure out the current state of the game

owqejfb commented 1 year ago

Forgot to include, if anyone is aware of what happens during 2OT+, i believe that scenario and halftime are the only ones that i havent been able to wait and check for during the games

owqejfb commented 12 months ago

want to add a new one i found 'END Q3', seems there are two possible values for when a quarter ends 'Q1' or 'END Q3'