UNPKG
nba
Version:
latest (4.15.0)
4.15.0
4.14.0
4.13.0
4.12.0
4.11.1
4.11.0
4.10.2
4.10.1
4.10.0
4.9.0
4.8.0
4.7.0
4.6.0
4.5.0
4.4.0
4.3.2
4.3.1
4.3.0
4.2.2
4.2.1
4.2.0
4.1.0
4.0.1
4.0.0
3.7.0
3.5.1
3.2.6
3.2.4
3.2.3
3.2.1
3.2.0
3.1.1
3.0.0
2.0.1
2.0.0
1.2.0
1.0.1
1.0.0
0.4.1
0.4.0
0.3.0
0.2.0
0.1.0
JavaScript client for the NBA's stats API
github.com/bttmly/nba
bttmly/nba
nba
/
scripts
/
run-endpoint.js
11 lines
(8 loc)
•
239 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
var
nba =
require
(
"../"
);
var
endpoint = process.
argv
[
2
];
var
props = process.
argv
.
slice
(
3
).
reduce
(
function
(
o, s
) {
var
split = s.
split
(
"="
); o[split[
0
]] = split[
1
];
return
o; }, {}); nba.
stats
[endpoint](props).
then
(
console
.
log
);