bttmly / nba

Node.js client for nba.com API endpoints

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

2018-19 rookies not in players.json file

jamesclarence opened this issue · comments

Hi! I was using the findPlayer function to find a couple of rookies (Trae Young, Luka Doncic), and I saw that rookie players this season (2018-19) aren't in the players.json file. Thanks

Hey! Thanks for the heads up – I'll publish a new version soon, but FYI you can always update this at runtime nba.updatePlayers() will update the nba.players object. Packaging a JSON file is just for convenience – using nba.updatePlayers() will always be a better option if you want the most up-to-date rosters since they change constantly.

If you have a long-running application you might want to call nba.updatePlayers() every so often to ensure your data is fresh. Otherwise if you're writing a script for data scraping or similar, you can just call that first then do whatever else you need.

Thanks, using nba.updatePlayers() worked for me