nba_api icon indicating copy to clipboard operation
nba_api copied to clipboard

[Bug]: Scoreboard not showing Summer League games

Open GitBarns opened this issue 2 years ago • 4 comments

NBA API Version

v1.2.1

Issue

Pretty much the title, I was hoping to use the summer league games as testing ground for the season live games, but looks the endpoint isn't returning anything The games do show up in LeagueGameFinder when passing today's date, but that would mean I'll need to change my whole code to support both formats (Scoreboard & LeagueGameFinder)

Any ideas how to solve for this?

Code

No response

GitBarns avatar Jul 06 '23 16:07 GitBarns

I have tons of issues with the summer league games as well, not just with the scoreboard. For instance

gamefinder = leaguegamefinder.LeagueGameFinder(team_id_nullable=team_id) games = gamefinder.get_data_frames()[0]

will include summer league games but

gamelog = playergamelog.PlayerGameLog(player_id='1629626', season="2021" ) games = gamelog.get_data_frames()[0]

this will not. I can't find any documentation on what endpoints include only reg season vs which include everything. Would appreciate if anyone knows where to look

cguth7 avatar Jul 12 '23 21:07 cguth7

@cguth7 Not sure it would answer your question, but for future users:

I ended up finding the summer league Scoreboard & BoxScore through trial and error... Scoreboard is at https://cdn.nba.com/static/json/VEGAS/liveData/scoreboard/todaysScoreboard_15.json BoxScore is at https://cdn.nba.com/static/json/VEGAS/liveData/boxscore/boxscore_{game_id}.json

and then I had to implement my own versions of ScoreBoard, BoxScore and NBALiveHTTP to take advantage of these 😞

it works, but it's ugly

GitBarns avatar Jul 12 '23 21:07 GitBarns

thanks - for reference I want to analyze the predictivity of summer league on reg season players stats, so I need all the summer league player stats.

To do this I just used leaguegamefinder.LeagueGameFinder to scrape all games in july and august, then used

boxscoretraditionalv2.BoxScoreTraditionalV2 to grab the actual box scores.

Super ugly and I'm used a lot of requests but this feels the easiest to me...

cguth7 avatar Jul 12 '23 22:07 cguth7

Summer Leagues are different from NBA for the source. You need to declare the LeagueID when you call Scoreboard which only supports single league's data for each call. It is different from LeagueGameFinder which default behavior is returning all of leagues' games that supported.

The identifier of NBA is 00. The several Summer Leagues' are,

  • Las Vegas: 15
  • California Classical: 13
  • Utah: 16
  • Orlando (deprecated): 14

Above are from experience, not from any official documents.

usharerose avatar Sep 09 '23 09:09 usharerose