kshvmdn / nba.js Goto Github PK
View Code? Open in Web Editor NEWNode.js library for NBA stats
Home Page: http://npmjs.com/package/nba.js
License: MIT License
Node.js library for NBA stats
Home Page: http://npmjs.com/package/nba.js
License: MIT License
Tests should be more exhaustive, particularly for the endpoint methods. They're currently not tested at all (individually), but probably should be.
I'm thinking most could be kept to 2 tests - one with the preset defaults and another with custom query options. In the case that there's an exception for a given method (unique defaults, etc.), there should be some more specific tests.
Add function to refresh score every X minutes. Will likely implement with APScheduler
.
I was thinking about polling this particular endpoint instead of "playercareerstats" because it gets updated after the game ends. I need real time data to get Player points in real time.
Base URL of the api is : http://data.nba.net/10s/prod/v1/
Could someone explain me what is that "10s" purpose?
I first thought it means "the 2010s", but if it is the case, that would mean the base url will change during the "2020-2021" season.
I am developing a mobile application with that API, and I would like to avoid any risks.
Thank you!
Wonder if this is working in 2020. I have tried acessing the endpoint without luck.
Hey all,
Currently in DATA.md, there are a list of endpoints with current
set as the date in the URL. For example:
divisionStandings
So, I wanted to see if I could get division standings for any random date during the season, such as March 3, 2017. Turns out it actually does return a response for that exact date.
Should the endpoints and docs be edited in the library to show this? I think this works for all current
instances in the URL, where we can replace it with YYYYMMDD
. What's the best way to make this change, then?
So it looks like there are some new endpoints available (not entirely sure that these are new, might've just not noticed them earlier) endpoints.
The problem is, the current structure (of this module) only focuses on stats.nba.com endpoints. This means the current endpoint worker
is specialized for the data returned from those endpoints. So this means we'll either have to reimplement the current worker or implement a new one.
Also, it'd be best to separate the stats
endpoints (i.e. all that are currently implemented) from the new ones.
Still got a few outstanding API endpoints that need to be implemented. Refer to src/constants/endpoints.js#L628
for the list.
What would an example of using parameters look like? I'm just not really understanding the syntax (for example, the teams method has the parameter year)
Thanks!
Requests to the stats endpoints seem to be timing out on specific servers. Tested on a Digital Ocean instance, request does resolve, but takes significantly longer (as expected, kind of at least), can see why this is a problem for slower connections.
Would love some input on how to fix this, current course of action is to investigate/research this a little bit more, got has a timeout
option that might help with this.
Originally reported on Twitter by Justin Conklin.
I think we can refactor how requests are made (data, stats) to provide browser support for this package. It looks like superagent supports both browserify and webpack, which'll allow us to bundle this into a browser library (please correct me if I'm mistaken, or if this is possible with got as well).
Will look into this a bit more and see what can be done.
Since nba.js allows you to choose between using Promises and callbacks to handle responses, when using a callback, if there's an error, Node throws a warning for unhandled Promises rejections.
Would be great if this could be resolved, I'll update this thread as I come up with possible solutions, input/ideas welcome.
Find the required parameters for each of the nba.stats
endpoints and make that parameter bold.
Most stats.nba.com endpoints will throw an error if a required parameter is missing, so we can use this to find the list of required params.
e.g. Making a request to http://stats.nba.com/stats/commonallplayers without any parameters will return:
LeagueID is required; Season is required; IsOnlyCurrentSeason is required
So the documentation for the data.stats.allPlayers
method should look like:
allPlayers
/stats/commonallplayers
IsOnlyCurrentSeason
LeagueID
Season
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.