bttmly / nba

Node.js client for nba.com API endpoints
MIT License
710 stars 180 forks source link

Live box score data #66

Closed jcostello93 closed 5 years ago

jcostello93 commented 5 years ago

I noticed that the scoreboard endpoint is updated while games are being played, but the two box score endpoints (boxScore and boxScoreSummary) aren't. Do you know any other way to get live box score data using this module?

jcostello93 commented 5 years ago

Found the endpoint:

https://data.nba.net/prod/v1/20190421/0041800134_boxscore.json

bttmly commented 5 years ago

Is that endpoint supported by the library already? If not, pull requests welcome

jcostello93 commented 5 years ago

NBA.data.boxScore calls a different endpoint with a slightly different response format, but it also returns live box score data.

NBA.data.playByPlay also returns live data while NBA.stats.boxScore and NBA.stats.playByPlay do not.

edit: should have added that NBA = require("nba") in the above calls

bttmly commented 5 years ago

As far as I can tell, they are trying to move their endpoints to the /data namespace so if there is duplicated functionality between NBA.stats and NBA.data, use data