Comments (11)
Hey @jordzhu, thanks for the issue!
So I've briefly described how each method works here. It might be kind of confusing though, so I'll try to re-explain.
Each method takes 2 optional arguments – query
and cb
. The first argument is the one that should contain the URL/request parameters (i.e. year
for this method).
nba.data.team({ year: '2016' }, function(err, res) {
if (err) {
console.error(err);
return;
}
console.log(res);
});
The documentation for data
endpoint parameters is incomplete right now, so if you're looking for some sort of specification for a parameter, feel free to ask away (most should be intuitive). It'll be updated very soon.
from nba.js.
The example you gave definitely helped. Looking forward to future updates, I think some more documentation will be very helpful. Either way great job man!
from nba.js.
Thanks dude! This helped a lot, I agree with sharpar :)
from nba.js.
@WataruKay Awesome! And sure, let me merge that right now. Also note that I've changed a few of the parameter names (including teamUrlCode
), refer to 88c7d76 for more info.
from nba.js.
There are a few examples here, but it isn't as comprehensive as it should/can be 😅. That'll be updated very soon as well.
from nba.js.
I'm not sure if I'm doing something wrong or not, but when I call currentScoreboard, it doesn't show the current scores.
nba.data.currentScoreboard(function(err, res) {
if (err) {
console.error(err);
return;
}
console.log(res);
});
Output:
{ games: [], numGames: 0 }
Also for scoreboard, what format is the date parameter supposed to be in?
from nba.js.
For scoreboard the date format is 'yyyy-mm-dd' so something like 20161027
.
As for the currentScoreboard endpoint it doesn't seem to be working.
from nba.js.
@sharpar Yeah, looks like the currentScoreboard
endpoint is returning nothing right now. I'm not entirely sure that this ever worked (might've just assumed it does, since it doesn't error out), going to keep it around for the time being.
@WataruKay is right about the date
format, should be of the form "yyyymmdd"
.
from nba.js.
Got a PR in the works (#11) for the data parameter references.
Should be merged soon (missing some information for teamUrlCode
/ seasonScheduleYear
right now, would love some help 😄).
from nba.js.
I just got all the teamurls valid for endpoints that use teamUrlCode
'hawks', 'fcbarcelona', 'celtics', 'nets', 'san_lorenzo', 'hornets', 'bulls', 'cavaliers', 'mavericks', 'nuggets', 'pistons', 'warriors', 'maccabi_haifa', 'rockets', 'pacers', 'clippers', 'lakers', 'grizzlies', 'heat', 'bucks', 'timberwolves', 'pelicans', 'knicks', 'thunder', 'magic', 'sixers', 'suns', 'blazers', 'real_madrid', 'kings', 'spurs', 'shanghai_sharks', 'raptors', 'jazz', 'wizards'
Should I wait for #11 to be merged then make a new pull request?
from nba.js.
I've submitted #12 with the 'teamName' values.
from nba.js.
Related Issues (14)
- Time error HOT 1
- Schedule score refresh
- Endpoint tests
- Endpoints HOT 2
- Implement new endpoints HOT 2
- Required parameters HOT 4
- Unhandled promise rejection warning HOT 1
- Use superagent to make requests
- Requests to the stats endpoints are timing out/hanging HOT 27
- Endpoints for optional date parameters HOT 2
- Is BoxScoreAdvancedV2 updated in real time?
- 10s purpose in API base URL
- This working now? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nba.js.