-
Notifications
You must be signed in to change notification settings - Fork 174
/
Copy pathdata.js
75 lines (58 loc) · 1.76 KB
/
data.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
const nba = require("../../");
describe("nba data methods", function () {
describe("#scoreboard", async () => {
it("works with a direct date string", async () => {
log(await nba.data.scoreboard("20181008"));
});
it("works with a date object", async () => {
// pinned to the time I wrote this test
log(await nba.data.scoreboard(new Date(1539056100872)));
});
});
it("#boxScore", async () => {
log(await nba.data.boxScore("20181009", "0011800055"));
});
it("#playByPlay", async () => {
log(await nba.data.playByPlay("20181009", "0011800055"));
});
it("#schedule", async () => {
log(await nba.data.schedule("2018"));
});
it("#teamSchedule", async () => {
log(await nba.data.teamSchedule("2018", 1610612752));
});
it("#previewArticle", async () => {
log(await nba.data.previewArticle("20190425", "0041800156"));
});
it("#recapArticle", async () => {
log(await nba.data.recapArticle("20190425", "0041800156"));
});
it("#leadTracker", async () => {
log(await nba.data.leadTracker("20190425", "0041800156", 1));
});
it("#playoffsBracket", async () => {
log(await nba.data.playoffsBracket("2018"));
});
it("#teamLeaders", async () => {
log(await nba.data.teamLeaders("2018", 1610612752));
});
it("#teamStatsRankings", async () => {
log(await nba.data.teamStatsRankings("2018"));
});
it("#coaches", async () => {
log(await nba.data.coaches("2018"));
});
it("#teams", async () => {
log(await nba.data.teams());
});
it("#calendar", async () => {
log(await nba.data.calendar());
});
it("#standings", async () => {
log(await nba.data.standings());
});
});
function log (...args) {
if (!process.env.WITH_LOGS) return;
console.log(...args);
}