nhl-api-ts 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -4
- package/dist/api/edge.d.mts +23 -23
- package/dist/api/edge.mjs +69 -23
- package/dist/api/game-center.d.mts +14 -14
- package/dist/api/game-center.mjs +20 -8
- package/dist/api/helpers.d.mts +6 -6
- package/dist/api/helpers.mjs +6 -6
- package/dist/api/misc.d.mts +5 -5
- package/dist/api/misc.mjs +15 -5
- package/dist/api/players.d.mts +4 -4
- package/dist/api/players.mjs +6 -2
- package/dist/api/schedule.d.mts +18 -18
- package/dist/api/schedule.mjs +26 -14
- package/dist/api/standings.d.mts +3 -3
- package/dist/api/standings.mjs +4 -4
- package/dist/api/stats.d.mts +10 -10
- package/dist/api/stats.mjs +16 -12
- package/dist/api/teams.d.mts +5 -5
- package/dist/api/teams.mjs +10 -6
- package/dist/cli/colors.d.mts +2 -2
- package/dist/cli/colors.mjs +6 -2
- package/dist/cli/commands.mjs +36 -26
- package/dist/cli/run.mjs +7 -5
- package/dist/http-client.mjs +2 -2
- package/dist/nhl-client.d.mts +1 -1
- package/dist/nhl-client.mjs +8 -6
- package/dist/types/common.d.mts +0 -1
- package/dist/types/edge.d.mts +2 -2
- package/dist/types/game-center.d.mts +54 -111
- package/dist/types/players.d.mts +1 -2
- package/dist/types/schedule.d.mts +34 -62
- package/dist/types/standings.d.mts +1 -2
- package/dist/types/stats.d.mts +106 -110
- package/dist/utils.d.mts +1 -1
- package/dist/utils.mjs +3 -1
- package/package.json +7 -28
|
@@ -35,24 +35,24 @@ export interface ClubScheduleGame {
|
|
|
35
35
|
awayTeam: ClubScheduleGameAwayTeam;
|
|
36
36
|
homeTeam: ScheduleHomeTeam;
|
|
37
37
|
periodDescriptor: PeriodDescriptor;
|
|
38
|
-
/** Absent
|
|
38
|
+
/** Absent before the game is played */
|
|
39
39
|
gameOutcome?: GameOutcome;
|
|
40
|
-
/** Absent
|
|
40
|
+
/** Absent before the game is played */
|
|
41
41
|
winningGoalie?: WinningGoalie;
|
|
42
|
-
/** Absent
|
|
42
|
+
/** Absent before the game is played */
|
|
43
43
|
winningGoalScorer?: WinningGoalie;
|
|
44
|
-
/** Absent
|
|
44
|
+
/** Absent before the game is played */
|
|
45
45
|
threeMinRecap?: string;
|
|
46
|
-
/** Absent
|
|
46
|
+
/** Absent before the game is played */
|
|
47
47
|
condensedGame?: string;
|
|
48
48
|
gameCenterLink: string;
|
|
49
|
-
/** Absent
|
|
49
|
+
/** Absent before the game is played */
|
|
50
50
|
threeMinRecapFr?: string;
|
|
51
|
-
/** Absent
|
|
51
|
+
/** Absent before the game is played */
|
|
52
52
|
condensedGameFr?: string;
|
|
53
|
-
/**
|
|
53
|
+
/** Only present before the game starts */
|
|
54
54
|
ticketsLink?: string;
|
|
55
|
-
/**
|
|
55
|
+
/** Only present before the game starts */
|
|
56
56
|
ticketsLinkFr?: string;
|
|
57
57
|
}
|
|
58
58
|
export interface ClubScheduleGameAwayTeam {
|
|
@@ -64,21 +64,14 @@ export interface ClubScheduleGameAwayTeam {
|
|
|
64
64
|
logo: string;
|
|
65
65
|
darkLogo: string;
|
|
66
66
|
awaySplitSquad: boolean;
|
|
67
|
-
/** Absent
|
|
67
|
+
/** Absent before the game is played */
|
|
68
68
|
score?: number;
|
|
69
|
-
/** Absent when team=BUF,week=now */
|
|
70
69
|
airlineLink?: string;
|
|
71
|
-
/** Absent when team=BUF,week=now */
|
|
72
70
|
airlineDesc?: string;
|
|
73
|
-
/** Absent when team=BUF,week=now */
|
|
74
71
|
hotelLink?: string;
|
|
75
|
-
/** Absent when team=BUF,week=now */
|
|
76
72
|
hotelDesc?: string;
|
|
77
|
-
/** Absent when team=BUF,week=2024-02-10 */
|
|
78
73
|
radioLink?: string;
|
|
79
|
-
/** Absent when team=BUF,week=2024-02-10; team=BUF,week=now; team=TOR,week=now */
|
|
80
74
|
promoLink?: string;
|
|
81
|
-
/** Absent when team=BUF,week=2024-02-10; team=BUF,week=now; team=TOR,week=now */
|
|
82
75
|
promoDesc?: string;
|
|
83
76
|
}
|
|
84
77
|
export interface ScheduleHomeTeam {
|
|
@@ -90,27 +83,19 @@ export interface ScheduleHomeTeam {
|
|
|
90
83
|
logo: string;
|
|
91
84
|
darkLogo: string;
|
|
92
85
|
homeSplitSquad: boolean;
|
|
93
|
-
/** Absent
|
|
86
|
+
/** Absent before the game is played */
|
|
94
87
|
score?: number;
|
|
95
|
-
/** Absent when team=BUF,week=2024-02-10; team=BUF,week=now */
|
|
96
88
|
hotelLink?: string;
|
|
97
|
-
/** Absent when team=BUF,week=2024-02-10; team=BUF,week=now */
|
|
98
89
|
hotelDesc?: string;
|
|
99
|
-
/** Absent when team=BUF,week=2024-02-10; team=BUF,week=now; team=TOR,week=now */
|
|
100
90
|
airlineLink?: string;
|
|
101
|
-
/** Absent when team=BUF,week=2024-02-10; team=BUF,week=now; team=TOR,week=now */
|
|
102
91
|
airlineDesc?: string;
|
|
103
|
-
/** Absent when team=BUF,week=2024-02-10 */
|
|
104
92
|
radioLink?: string;
|
|
105
|
-
/** Absent when team=BUF,week=2024-02-10; team=BUF,week=now; team=TOR,week=now */
|
|
106
93
|
promoLink?: string;
|
|
107
|
-
/** Absent when team=BUF,week=2024-02-10; team=BUF,week=now; team=TOR,week=now */
|
|
108
94
|
promoDesc?: string;
|
|
109
95
|
}
|
|
110
96
|
export interface SpecialEvent {
|
|
111
97
|
parentId: number;
|
|
112
98
|
name: LocalizedString;
|
|
113
|
-
/** Low sample count */
|
|
114
99
|
lightLogoUrl?: LocalizedString;
|
|
115
100
|
}
|
|
116
101
|
export interface GameWeekDay {
|
|
@@ -197,9 +182,7 @@ export interface PlayoffSeriesSchedule {
|
|
|
197
182
|
topSeedTeam: PlayoffSeriesTeam;
|
|
198
183
|
games: PlayoffSeriesScheduleGame[];
|
|
199
184
|
fullCoverageUrl: PlayoffFullCoverageUrls;
|
|
200
|
-
/** Absent when season=20232024,series=o. Low sample count */
|
|
201
185
|
conferenceAbbrev?: string;
|
|
202
|
-
/** Absent when season=20232024,series=o. Low sample count */
|
|
203
186
|
conferenceName?: string;
|
|
204
187
|
}
|
|
205
188
|
export interface PlayoffFullCoverageUrls {
|
|
@@ -289,34 +272,33 @@ export interface ScheduleGame {
|
|
|
289
272
|
awayTeam: WeeklyScheduleGameAwayTeam;
|
|
290
273
|
homeTeam: WeeklyScheduleGameHomeTeam;
|
|
291
274
|
periodDescriptor: WeeklySchedulePeriodDescriptor;
|
|
292
|
-
/** Absent
|
|
275
|
+
/** Absent before the game is played */
|
|
293
276
|
gameOutcome?: GameOutcome;
|
|
294
|
-
/** Absent
|
|
277
|
+
/** Absent before the game is played */
|
|
295
278
|
winningGoalie?: WinningGoalie;
|
|
296
|
-
/** Absent
|
|
279
|
+
/** Absent before the game is played */
|
|
297
280
|
winningGoalScorer?: WinningGoalie;
|
|
298
|
-
/** Absent
|
|
281
|
+
/** Absent before the game is played */
|
|
299
282
|
threeMinRecap?: string;
|
|
300
|
-
/** Absent
|
|
283
|
+
/** Absent before the game is played */
|
|
301
284
|
threeMinRecapFr?: string;
|
|
302
285
|
gameCenterLink: string;
|
|
303
|
-
/** Absent
|
|
286
|
+
/** Absent before the game is played */
|
|
304
287
|
condensedGame?: string;
|
|
305
|
-
/** Absent when date=now; date=playoff; date=regular. Low sample count */
|
|
306
288
|
specialEvent?: SpecialEvent;
|
|
307
|
-
/**
|
|
289
|
+
/** Only present before the game starts */
|
|
308
290
|
ticketsLink?: string;
|
|
309
|
-
/**
|
|
291
|
+
/** Only present before the game starts */
|
|
310
292
|
ticketsLinkFr?: string;
|
|
311
|
-
/**
|
|
293
|
+
/** Playoff games only */
|
|
312
294
|
seriesStatus?: SeriesStatus;
|
|
313
|
-
/**
|
|
295
|
+
/** Playoff games only */
|
|
314
296
|
seriesUrl?: string;
|
|
315
297
|
}
|
|
316
298
|
export interface TeamSeasonSchedule {
|
|
317
299
|
previousSeason: number;
|
|
318
300
|
currentSeason: number;
|
|
319
|
-
/** Absent
|
|
301
|
+
/** Absent for the current season */
|
|
320
302
|
nextSeason?: number;
|
|
321
303
|
clubTimezone: string;
|
|
322
304
|
clubUTCOffset: string;
|
|
@@ -341,26 +323,24 @@ export interface TeamSeasonScheduleGame {
|
|
|
341
323
|
periodDescriptor: PeriodDescriptor;
|
|
342
324
|
gameOutcome?: GameOutcome;
|
|
343
325
|
winningGoalie?: WinningGoalie;
|
|
344
|
-
/** Absent
|
|
326
|
+
/** Absent before the game is played and for older seasons (for example, 1999-2000) */
|
|
345
327
|
winningGoalScorer?: WinningGoalie;
|
|
346
|
-
/** Absent when team=BUF,season=19992000; team=BUF,season=now; team=TOR,season=now */
|
|
347
328
|
specialEvent?: SpecialEvent;
|
|
348
329
|
gameCenterLink: string;
|
|
349
|
-
/** Absent
|
|
330
|
+
/** Absent before the game is played and for older seasons (for example, 1999-2000) */
|
|
350
331
|
threeMinRecap?: string;
|
|
351
|
-
/** Absent
|
|
332
|
+
/** Absent before the game is played and for older seasons (for example, 1999-2000) */
|
|
352
333
|
condensedGame?: string;
|
|
353
|
-
/** Absent
|
|
334
|
+
/** Absent before the game is played and for older seasons (for example, 1999-2000) */
|
|
354
335
|
threeMinRecapFr?: string;
|
|
355
|
-
/**
|
|
336
|
+
/** Playoff games only */
|
|
356
337
|
seriesStatus?: SeasonScheduleSeriesStatus;
|
|
357
|
-
/**
|
|
338
|
+
/** Playoff games only */
|
|
358
339
|
seriesUrl?: string;
|
|
359
|
-
/** Absent when team=SEA,season=20232024 */
|
|
360
340
|
condensedGameFr?: string;
|
|
361
|
-
/**
|
|
341
|
+
/** Only present before the game starts */
|
|
362
342
|
ticketsLink?: string;
|
|
363
|
-
/**
|
|
343
|
+
/** Only present before the game starts */
|
|
364
344
|
ticketsLinkFr?: string;
|
|
365
345
|
}
|
|
366
346
|
export interface TeamSeasonScheduleGameAwayTeam {
|
|
@@ -373,19 +353,12 @@ export interface TeamSeasonScheduleGameAwayTeam {
|
|
|
373
353
|
darkLogo: string;
|
|
374
354
|
awaySplitSquad: boolean;
|
|
375
355
|
score?: number;
|
|
376
|
-
/** Absent when team=BUF,season=19992000 */
|
|
377
356
|
hotelLink?: string;
|
|
378
|
-
/** Absent when team=BUF,season=19992000 */
|
|
379
357
|
hotelDesc?: string;
|
|
380
|
-
/** Absent when team=BUF,season=19992000 */
|
|
381
358
|
airlineLink?: string;
|
|
382
|
-
/** Absent when team=BUF,season=19992000 */
|
|
383
359
|
airlineDesc?: string;
|
|
384
|
-
/** Absent when team=SEA,season=20232024 */
|
|
385
360
|
radioLink?: string;
|
|
386
|
-
/** Absent when team=SEA,season=20232024 */
|
|
387
361
|
promoLink?: string;
|
|
388
|
-
/** Absent when team=SEA,season=20232024 */
|
|
389
362
|
promoDesc?: string;
|
|
390
363
|
}
|
|
391
364
|
export interface SeasonScheduleSeriesStatus {
|
|
@@ -419,9 +392,9 @@ export interface WeeklyScheduleGameAwayTeam {
|
|
|
419
392
|
logo: string;
|
|
420
393
|
darkLogo: string;
|
|
421
394
|
awaySplitSquad: boolean;
|
|
422
|
-
/** Absent
|
|
395
|
+
/** Absent before the game is played */
|
|
423
396
|
score?: number;
|
|
424
|
-
/**
|
|
397
|
+
/** Only present before the game starts */
|
|
425
398
|
radioLink?: string;
|
|
426
399
|
/** Present only while odds are published for the game. */
|
|
427
400
|
odds?: TeamOdd[];
|
|
@@ -435,9 +408,9 @@ export interface WeeklyScheduleGameHomeTeam {
|
|
|
435
408
|
logo: string;
|
|
436
409
|
darkLogo: string;
|
|
437
410
|
homeSplitSquad: boolean;
|
|
438
|
-
/** Absent
|
|
411
|
+
/** Absent before the game is played */
|
|
439
412
|
score?: number;
|
|
440
|
-
/**
|
|
413
|
+
/** Only present before the game starts */
|
|
441
414
|
radioLink?: string;
|
|
442
415
|
/** Present only while odds are published for the game. */
|
|
443
416
|
odds?: TeamOdd[];
|
|
@@ -446,7 +419,6 @@ export interface WeeklySchedulePeriodDescriptor {
|
|
|
446
419
|
number: number;
|
|
447
420
|
periodType: PeriodType;
|
|
448
421
|
maxRegulationPeriods: number;
|
|
449
|
-
/** Absent when date=regular. Low sample count */
|
|
450
422
|
otPeriods?: number;
|
|
451
423
|
}
|
|
452
424
|
export interface WinningGoalie {
|
|
@@ -2,7 +2,7 @@ import type { GameType, LocalizedString } from '#src/types/common.mjs';
|
|
|
2
2
|
export interface LeagueStandings {
|
|
3
3
|
wildCardIndicator: boolean;
|
|
4
4
|
standings: StandingsEntry[];
|
|
5
|
-
/**
|
|
5
|
+
/** Only present for the current standings */
|
|
6
6
|
standingsDateTimeUtc?: string;
|
|
7
7
|
}
|
|
8
8
|
export interface StandingsEntry {
|
|
@@ -87,7 +87,6 @@ export interface StandingsEntry {
|
|
|
87
87
|
conferenceName?: string;
|
|
88
88
|
divisionAbbrev?: string;
|
|
89
89
|
divisionName?: string;
|
|
90
|
-
/** Low sample count */
|
|
91
90
|
clinchIndicator?: string;
|
|
92
91
|
}
|
|
93
92
|
export interface StandingsSeason {
|