bttmly / nba

Node.js client for nba.com API endpoints
MIT License
708 stars 173 forks source link

Implement league standings #47

Closed cacheflow closed 6 years ago

cacheflow commented 6 years ago

-This adds a new namespace called leagueStandings under stats, which returns the NBA's standings for that year. -Included the necessary API standings endpoint. -Added a new transform to segment standings by conference and divison. -Lastly, included a test and updated Readme on how to use it.

cacheflow commented 6 years ago

Also, I'm not entirely sure if the standings.json file is needed along with the updateStandings function found in index.js. I was trying to follow your convention, but not entirely sure if it is needed. Could you explain why you're caching the teams and players? @bttmly 😄

quin commented 6 years ago

Wow! Looks great. Thanks @cacheflow, lil guy. Looking forward to this getting merged in!

programurr commented 6 years ago

+1 @cacheflow @bttmly

bttmly commented 6 years ago

Shoot, sorry, forgot to bump nba-client-template in this package after this commit https://github.com/bttmly/nba-client-template/pull/3

This functionality is automatically added once we use the new template, so we don't need to make any JS source changes. https://github.com/bttmly/nba/commit/04667cdc050e7d298bad9ca75ca47fd0831a59dd

Seems to work great, feel free to reopen if you hit any issues. Latest is nba@4.1.0

cacheflow commented 6 years ago

Cool cool. I'll check it out. Thanks @bttmly.