bttmly / nba

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

`nba.stats.scoreboard`: No way to get game start time #84

Closed garyking closed 4 years ago

garyking commented 4 years ago

With nba.stats.scoreboard, it seems like if the game is live, then there's no way to get its start time?

bttmly commented 4 years ago

try using nba.data.scoreboard, the stats namespace endpoints are old and it seems like nba.com is deprecating them.

garyking commented 4 years ago

Are there docs on nba.data.scoreboard? I can't seem to find any.

Edit: Turns out, I've been using the same endpoint as nba.data.scoreboard, but using the URL directly, rather than through this library. I originally made this thread, because that endpoint stopped working for about 24 hours yesterday.

bttmly commented 4 years ago

Ah interesting. No, sorry, I don't really have the bandwidth to document the data endpoints right now. The purpose of this library is largely to find endpoints and give a simple JS API for them. I would be interested in writing an automated tool that discerned the response shape from a sample response but haven't gotten to them. However I try to put in a basic test for each endpoint (https://github.com/bttmly/nba/blob/master/test/integration/data.js). You can run that test file with mocha with a WITH_LOGS environment variable to log the response data.

garyking commented 4 years ago

The endpoint once again stopped working.

This returns File not found." right now.

It would be nice if we could find an existing endpoint that was more stable, and with the same amount of data.

garyking commented 4 years ago

I went to this page and checked Chrome's Network tab for XHR requests. That led me to this useful JSON.