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.
@@ -4,7 +4,7 @@ export interface BoxscoreGoalie {
4
4
  sweaterNumber: number;
5
5
  name: LocalizedString;
6
6
  position: string;
7
- /** Absent when game=preseason; game=shootout */
7
+ /** Absent for preseason games */
8
8
  starter?: boolean;
9
9
  evenStrengthShotsAgainst?: string;
10
10
  powerPlayShotsAgainst?: string;
@@ -14,7 +14,7 @@ export interface BoxscoreGoalie {
14
14
  evenStrengthGoalsAgainst?: number;
15
15
  powerPlayGoalsAgainst?: number;
16
16
  shorthandedGoalsAgainst?: number;
17
- /** Absent when game=preseason; game=shootout */
17
+ /** Absent for preseason games */
18
18
  pim?: number;
19
19
  goalsAgainst?: number;
20
20
  toi?: string;
@@ -132,34 +132,35 @@ export interface DailyScoresGame {
132
132
  awayTeam: DailyScoresTeam;
133
133
  homeTeam: DailyScoresTeam;
134
134
  gameCenterLink: string;
135
- /** Absent when date=now */
135
+ /** Absent before the game is played */
136
136
  threeMinRecap?: string;
137
- /** Absent when date=now; date=playoff. Low sample count */
137
+ /** Absent before the game is played */
138
138
  threeMinRecapFr?: string;
139
- /** Absent when date=now; date=playoff; date=regular. Low sample count */
139
+ /** Absent before the game is played */
140
140
  condensedGame?: string;
141
- /** Absent when date=now */
141
+ /** Absent before the game is played */
142
142
  clock?: GameClock;
143
143
  neutralSite: boolean;
144
144
  venueTimezone: string;
145
- /** Absent when date=now */
145
+ /** Absent before the game is played */
146
146
  period?: number;
147
- /** Absent when date=now */
147
+ /** Absent before the game is played */
148
148
  periodDescriptor?: PeriodDescriptor;
149
- /** Absent when date=now */
149
+ /** Absent before the game is played */
150
150
  gameOutcome?: GameOutcome;
151
- /** Absent when date=now */
151
+ /** Absent before the game is played */
152
152
  goals?: GameGoal[];
153
- /** Absent when date=playoff; date=regular. Low sample count */
153
+ /** Only present before the game starts */
154
154
  ticketsLink?: string;
155
- /** Absent when date=playoff; date=regular. Low sample count */
155
+ /** Only present before the game starts */
156
156
  ticketsLinkFr?: string;
157
- /** Absent when date=playoff; date=regular. Low sample count */
157
+ /** Only present before the game starts */
158
158
  teamLeaders?: GameTeamLeader[];
159
- /** Absent when date=regular. Low sample count */
159
+ /** Playoff games only */
160
160
  seriesStatus?: SeriesStatus;
161
- /** Absent when date=regular. Low sample count */
161
+ /** Playoff games only */
162
162
  seriesUrl?: string;
163
+ condensedGameFr?: string;
163
164
  }
164
165
  export interface DailyScoresGameWeek {
165
166
  date: string;
@@ -178,9 +179,7 @@ export interface DailyScoresTvBroadcast {
178
179
  network: string;
179
180
  sequenceNumber: number;
180
181
  logoUrls?: TeamLogo;
181
- /** Absent when date=regular */
182
182
  parentId?: number;
183
- /** Absent when date=regular. Low sample count */
184
183
  languageCode?: string;
185
184
  }
186
185
  export interface DelayedPenaltyDetails {
@@ -222,14 +221,14 @@ export interface DailyScoresTeam {
222
221
  id: number;
223
222
  name: LocalizedString;
224
223
  abbrev: string;
225
- /** Absent when date=now */
224
+ /** Absent before the game is played */
226
225
  score?: number;
227
- /** Absent when date=now */
226
+ /** Absent before the game is played */
228
227
  sog?: number;
229
228
  logo: string;
230
- /** Absent when date=playoff; date=regular. Low sample count */
229
+ /** Only present before the game starts */
231
230
  record?: string;
232
- /** Absent when date=playoff; date=regular. Low sample count */
231
+ /** Only present before the game starts */
233
232
  odds?: TeamOdd[];
234
233
  }
235
234
  export interface GameClock {
@@ -243,7 +242,6 @@ export interface GameEndPlay {
243
242
  periodDescriptor: PeriodDescriptor;
244
243
  timeInPeriod: string;
245
244
  timeRemaining: string;
246
- /** Absent when game=preseason; game=shootout */
247
245
  situationCode?: OpenUnion<'0440' | '1551'>;
248
246
  homeTeamDefendingSide: OpenUnion<'right' | 'left'>;
249
247
  typeCode: number;
@@ -270,9 +268,7 @@ export interface GameGoal {
270
268
  highlightClipSharingUrlFr?: string;
271
269
  highlightClip?: number;
272
270
  highlightClipFr?: number;
273
- /** Absent when date=regular. Low sample count */
274
271
  discreteClip?: number;
275
- /** Absent when date=regular. Low sample count */
276
272
  discreteClipFr?: number;
277
273
  goalInGame?: number;
278
274
  }
@@ -302,16 +298,16 @@ export interface GameLanding {
302
298
  awayTeam: GameLandingAwayTeam;
303
299
  homeTeam: GameLandingAwayTeam;
304
300
  shootoutInUse: boolean;
305
- /** Absent when game=playoff */
301
+ /** Absent for playoff games */
306
302
  maxPeriods?: number;
307
303
  regPeriods: number;
308
304
  otInUse: boolean;
309
305
  tiesInUse: boolean;
310
- /** Absent when game=legacy; game=overtime; game=playoff; game=preseason; game=regular; game=shootout. Low sample count */
306
+ /** Only present before the game starts */
311
307
  ticketsLink?: string;
312
- /** Absent when game=legacy; game=overtime; game=playoff; game=preseason; game=regular; game=shootout. Low sample count */
308
+ /** Only present before the game starts */
313
309
  ticketsLinkFr?: string;
314
- /** Absent when game=legacy; game=overtime; game=playoff; game=preseason; game=regular; game=shootout. Low sample count */
310
+ /** Only present before the game starts */
315
311
  matchup?: GameLandingMatchup;
316
312
  periodDescriptor?: PeriodDescriptor;
317
313
  summary?: GameLandingSummary;
@@ -325,7 +321,7 @@ export interface GameLandingAwayTeam {
325
321
  placeNameWithPreposition: LocalizedString;
326
322
  logo: string;
327
323
  darkLogo: string;
328
- /** Absent when game=legacy; game=overtime; game=playoff; game=preseason; game=regular; game=shootout. Low sample count */
324
+ /** Only present before the game starts */
329
325
  record?: string;
330
326
  score?: number;
331
327
  sog?: number;
@@ -357,29 +353,24 @@ export interface GameLandingScoringGoal {
357
353
  assists: GoalAssist[];
358
354
  isHome: boolean;
359
355
  situationCode?: OpenUnion<'1551' | '0651' | '1331' | '0101' | '1451'>;
360
- /** Absent when game=preseason; game=shootout */
356
+ /** Absent for preseason games and older seasons */
361
357
  highlightClipSharingUrl?: string;
362
- /** Absent when game=preseason; game=shootout */
358
+ /** Absent for preseason games and older seasons */
363
359
  highlightClip?: number;
364
- /** Absent when game=preseason; game=shootout */
360
+ /** Absent for preseason games and older seasons */
365
361
  pptReplayUrl?: string;
366
362
  homeTeamDefendingSide?: OpenUnion<'left' | 'right'>;
367
- /** Absent when game=playoff; game=preseason; game=shootout. Low sample count */
368
363
  goalInGame?: number;
369
- /** Absent when game=preseason; game=regular; game=shootout. Low sample count */
370
364
  discreteClip?: number;
371
- /** Absent when game=preseason; game=regular; game=shootout. Low sample count */
372
365
  discreteClipFr?: number;
373
- /** Absent when game=preseason; game=regular; game=shootout. Low sample count */
374
366
  highlightClipSharingUrlFr?: string;
375
- /** Absent when game=preseason; game=regular; game=shootout. Low sample count */
376
367
  highlightClipFr?: number;
377
368
  }
378
369
  export interface GameLandingSummary {
379
370
  scoring: GameLandingSummaryScoring[];
380
371
  threeStars: GameLandingSummaryThreeStar[];
381
372
  penalties: SummaryPenalty[];
382
- /** Absent when game=regular. Low sample count */
373
+ /** Only for games decided by a shootout */
383
374
  shootout?: SummaryShootout;
384
375
  }
385
376
  export interface GameLandingSummaryScoring {
@@ -397,9 +388,9 @@ export interface GameLandingSummaryThreeStar {
397
388
  goals?: number;
398
389
  assists?: number;
399
390
  points?: number;
400
- /** Absent when game=preseason; game=regular; game=shootout. Low sample count */
391
+ /** Goalies only */
401
392
  goalsAgainstAverage?: number;
402
- /** Absent when game=preseason; game=regular; game=shootout. Low sample count */
393
+ /** Goalies only */
403
394
  savePctg?: number;
404
395
  }
405
396
  export interface GameStory {
@@ -420,12 +411,12 @@ export interface GameStory {
420
411
  awayTeam: GameStoryAwayTeam;
421
412
  homeTeam: GameStoryAwayTeam;
422
413
  shootoutInUse: boolean;
423
- /** Absent when game=playoff */
414
+ /** Absent for playoff games */
424
415
  maxPeriods?: number;
425
416
  regPeriods: number;
426
417
  otInUse: boolean;
427
418
  tiesInUse: boolean;
428
- /** Absent when game=legacy; game=overtime; game=playoff; game=preseason; game=regular; game=shootout. Low sample count */
419
+ /** Only present before the game starts */
429
420
  preGameMatchup?: PreGameMatchup;
430
421
  summary?: GameStorySummary;
431
422
  periodDescriptor?: PeriodDescriptor;
@@ -437,7 +428,7 @@ export interface GameStoryAwayTeam {
437
428
  abbrev: string;
438
429
  placeName: LocalizedString;
439
430
  logo: string;
440
- /** Absent when game=legacy; game=overtime; game=playoff; game=preseason; game=regular; game=shootout. Low sample count */
431
+ /** Only present before the game starts */
441
432
  record?: string;
442
433
  score?: number;
443
434
  sog?: number;
@@ -459,7 +450,6 @@ export interface GameStoryTvBroadcast {
459
450
  countryCode: string;
460
451
  network: string;
461
452
  sequenceNumber: number;
462
- /** Absent when game=regular */
463
453
  logoUrls?: TeamLogo;
464
454
  }
465
455
  export interface GameTeamLeader {
@@ -503,37 +493,31 @@ export interface GoalAssist {
503
493
  export interface GoalDetails {
504
494
  shotType: ShotType;
505
495
  scoringPlayerId: number;
506
- /** Absent when game=preseason; game=shootout */
507
496
  scoringPlayerTotal?: number;
508
- /** Absent when game=preseason; game=regular; game=shootout */
497
+ /** Absent for unassisted goals */
509
498
  assist1PlayerId?: number;
510
- /** Absent when game=preseason; game=regular; game=shootout */
499
+ /** Absent for unassisted goals */
511
500
  assist1PlayerTotal?: number;
512
- /** Absent when game=overtime; game=playoff; game=preseason; game=regular; game=shootout */
501
+ /** Absent unless the goal had two assists */
513
502
  assist2PlayerId?: number;
514
- /** Absent when game=overtime; game=playoff; game=preseason; game=regular; game=shootout */
503
+ /** Absent unless the goal had two assists */
515
504
  assist2PlayerTotal?: number;
516
505
  eventOwnerTeamId: number;
517
- /** Absent when game=playoff */
506
+ /** Absent when the net was empty */
518
507
  goalieInNetId?: number;
519
508
  awayScore: number;
520
509
  homeScore: number;
521
510
  xCoord?: number;
522
511
  yCoord?: number;
523
512
  zoneCode?: ZoneCode;
524
- /** Absent when game=preseason; game=shootout */
513
+ /** Absent for preseason games and older seasons */
525
514
  highlightClipSharingUrl?: string;
526
- /** Absent when game=preseason; game=shootout */
515
+ /** Absent for preseason games and older seasons */
527
516
  highlightClip?: number;
528
- /** Absent when game=overtime; game=playoff; game=preseason; game=regular; game=shootout. Low sample count */
529
517
  goalInGame?: number;
530
- /** Absent when game=preseason; game=regular; game=shootout. Low sample count */
531
518
  discreteClip?: number;
532
- /** Absent when game=preseason; game=regular; game=shootout. Low sample count */
533
519
  discreteClipFr?: number;
534
- /** Absent when game=preseason; game=regular; game=shootout. Low sample count */
535
520
  highlightClipSharingUrlFr?: string;
536
- /** Absent when game=preseason; game=regular; game=shootout. Low sample count */
537
521
  highlightClipFr?: number;
538
522
  }
539
523
  export interface GoalieComparisonTeam {
@@ -545,27 +529,16 @@ export interface SeasonStatsGoalie {
545
529
  teamId: number;
546
530
  sweaterNumber: number;
547
531
  name: LocalizedString;
548
- /** Low sample count */
549
532
  gamesPlayed?: number;
550
- /** Low sample count */
551
533
  wins?: number;
552
- /** Low sample count */
553
534
  losses?: number;
554
- /** Low sample count */
555
535
  otLosses?: number;
556
- /** Low sample count */
557
536
  shotsAgainst?: number;
558
- /** Low sample count */
559
537
  goalsAgainst?: number;
560
- /** Low sample count */
561
538
  goalsAgainstAvg?: number;
562
- /** Low sample count */
563
539
  savePctg?: number;
564
- /** Low sample count */
565
540
  shutouts?: number;
566
- /** Low sample count */
567
541
  saves?: number;
568
- /** Low sample count */
569
542
  toi?: string;
570
543
  }
571
544
  export interface GoalPlay {
@@ -579,7 +552,7 @@ export interface GoalPlay {
579
552
  details: GoalDetails;
580
553
  situationCode?: OpenUnion<'1551' | '0651' | '1331' | '1010' | '0101' | '1451'>;
581
554
  homeTeamDefendingSide?: OpenUnion<'left' | 'right'>;
582
- /** Absent when game=preseason; game=shootout */
555
+ /** Absent for preseason games and older seasons */
583
556
  pptReplayUrl?: string;
584
557
  }
585
558
  export interface HitDetails {
@@ -610,17 +583,11 @@ export interface GoalieLeader {
610
583
  sweaterNumber: number;
611
584
  headshot: string;
612
585
  positionCode: PositionCode;
613
- /** Low sample count */
614
586
  gamesPlayed?: number;
615
- /** Low sample count */
616
587
  seasonPoints?: number;
617
- /** Low sample count */
618
588
  record?: string;
619
- /** Low sample count */
620
589
  gaa?: number;
621
- /** Low sample count */
622
590
  savePctg?: number;
623
- /** Low sample count */
624
591
  shutouts?: number;
625
592
  }
626
593
  export interface GoalieTeamTotals {
@@ -807,7 +774,7 @@ export interface PlayByPlay {
807
774
  otInUse: boolean;
808
775
  clock: GameClock;
809
776
  displayPeriod: number;
810
- /** Absent when game=playoff */
777
+ /** Absent for playoff games */
811
778
  maxPeriods?: number;
812
779
  plays: Play[];
813
780
  rosterSpots: PlayByPlayRosterSpot[];
@@ -862,17 +829,16 @@ export interface RightRail {
862
829
  seasonSeries: RightRailSeasonSeries[];
863
830
  seasonSeriesWins: RightRailSeasonSeriesWins;
864
831
  gameInfo: RightRailGameInfo;
865
- /** Absent when game=legacy; game=overtime; game=playoff; game=preseason; game=regular; game=shootout. Low sample count */
832
+ /** Only present before the game starts */
866
833
  teamSeasonStats?: RightRailTeamSeasonStats;
867
- /** Absent when game=legacy; game=overtime; game=playoff; game=preseason; game=regular; game=shootout. Low sample count */
834
+ /** Only present before the game starts */
868
835
  last10Record?: RightRailLast10Record;
869
836
  linescore?: RightRailLinescore;
870
837
  shotsByPeriod?: LinescoreByPeriod[];
871
838
  teamGameStats?: SummaryTeamGameStat[];
872
839
  gameReports?: RightRailGameReports;
873
- /** Absent when game=preseason; game=regular; game=shootout. Low sample count */
840
+ /** Playoff games only */
874
841
  seasonSeriesFullCoverageUrl?: GameFullCoverageUrls;
875
- /** Absent when game=preseason; game=shootout. Low sample count */
876
842
  gameVideo?: RightRailGameVideo;
877
843
  }
878
844
  export interface RightRailGameInfo {
@@ -889,16 +855,15 @@ export interface RightRailGameReports {
889
855
  faceoffComparison: string;
890
856
  rosters: string;
891
857
  shotSummary: string;
892
- /** Absent when game=preseason; game=shootout */
858
+ /** Absent for preseason games */
893
859
  shiftChart?: string;
894
860
  toiAway: string;
895
861
  toiHome: string;
896
- /** Absent when game=regular. Low sample count */
862
+ /** Only for games decided by a shootout */
897
863
  shootoutSummary?: string;
898
864
  }
899
865
  export interface RightRailGameVideo {
900
866
  threeMinRecap: number;
901
- /** Low sample count */
902
867
  condensedGame?: number;
903
868
  }
904
869
  export interface RightRailLast10Record {
@@ -910,7 +875,7 @@ export interface RightRailLast10Record {
910
875
  export interface RightRailLinescore {
911
876
  byPeriod: LinescoreByPeriod[];
912
877
  totals: LinescoreTotals;
913
- /** Absent when game=regular. Low sample count */
878
+ /** Only for games decided by a shootout */
914
879
  shootout?: LinescoreShootout;
915
880
  }
916
881
  export interface RightRailSeasonSeries {
@@ -942,7 +907,7 @@ export interface GameFullCoverageUrls {
942
907
  export interface RightRailSeasonSeriesWins {
943
908
  awayTeamWins: number;
944
909
  homeTeamWins: number;
945
- /** Absent when game=preseason; game=regular; game=shootout. Low sample count */
910
+ /** Playoff games only */
946
911
  neededToWin?: number;
947
912
  }
948
913
  export interface RightRailTeamSeasonStats {
@@ -970,20 +935,15 @@ export interface ScoringGoal {
970
935
  assists: GoalAssist[];
971
936
  isHome: boolean;
972
937
  situationCode?: OpenUnion<'1551' | '0651' | '1331' | '0101' | '1451'>;
973
- /** Absent when game=preseason; game=shootout */
938
+ /** Absent for preseason games and older seasons */
974
939
  highlightClipSharingUrl?: string;
975
- /** Absent when game=preseason; game=shootout */
940
+ /** Absent for preseason games and older seasons */
976
941
  highlightClip?: number;
977
942
  homeTeamDefendingSide?: OpenUnion<'left' | 'right'>;
978
- /** Absent when game=playoff; game=preseason; game=shootout. Low sample count */
979
943
  goalInGame?: number;
980
- /** Absent when game=preseason; game=regular; game=shootout. Low sample count */
981
944
  discreteClip?: number;
982
- /** Absent when game=preseason; game=regular; game=shootout. Low sample count */
983
945
  discreteClipFr?: number;
984
- /** Absent when game=preseason; game=regular; game=shootout. Low sample count */
985
946
  highlightClipSharingUrlFr?: string;
986
- /** Absent when game=preseason; game=regular; game=shootout. Low sample count */
987
947
  highlightClipFr?: number;
988
948
  }
989
949
  export interface SeasonSeriesTeam {
@@ -1015,7 +975,6 @@ export interface ShiftEntry {
1015
975
  teamId: number;
1016
976
  teamName: string;
1017
977
  typeCode: number;
1018
- /** Low sample count */
1019
978
  eventDetails?: string | null;
1020
979
  }
1021
980
  export interface ShootoutCompletePlay {
@@ -1075,35 +1034,20 @@ export interface SeasonStatsSkater {
1075
1034
  sweaterNumber: number;
1076
1035
  name: LocalizedString;
1077
1036
  position: string;
1078
- /** Low sample count */
1079
1037
  gamesPlayed?: number;
1080
- /** Low sample count */
1081
1038
  goals?: number;
1082
- /** Low sample count */
1083
1039
  assists?: number;
1084
- /** Low sample count */
1085
1040
  points?: number;
1086
- /** Low sample count */
1087
1041
  plusMinus?: number;
1088
- /** Low sample count */
1089
1042
  pim?: number;
1090
- /** Low sample count */
1091
1043
  avgPoints?: number;
1092
- /** Low sample count */
1093
1044
  avgTimeOnIce?: string;
1094
- /** Low sample count */
1095
1045
  gameWinningGoals?: number;
1096
- /** Low sample count */
1097
1046
  shots?: number;
1098
- /** Low sample count */
1099
1047
  shootingPctg?: number;
1100
- /** Low sample count */
1101
1048
  faceoffWinningPctg?: number;
1102
- /** Low sample count */
1103
1049
  powerPlayGoals?: number;
1104
- /** Low sample count */
1105
1050
  blockedShots?: number;
1106
- /** Low sample count */
1107
1051
  hits?: number;
1108
1052
  }
1109
1053
  export interface SkatingLeadersLeader {
@@ -1113,7 +1057,6 @@ export interface SkatingLeadersLeader {
1113
1057
  }
1114
1058
  export interface StoppageDetails {
1115
1059
  reason: OpenUnion<'offside' | 'puck-frozen' | 'puck-in-netting' | 'goalie-stopped-after-sog' | 'puck-in-benches' | 'icing' | 'referee-or-linesman' | 'puck-in-crowd' | 'net-dislodged-offensive-skater' | 'tv-timeout' | 'hand-pass' | 'high-stick' | 'visitor-timeout' | 'objects-on-ice'>;
1116
- /** Absent when game=overtime; game=playoff; game=preseason; game=regular; game=shootout */
1117
1060
  secondaryReason?: OpenUnion<'tv-timeout' | 'visitor-timeout'>;
1118
1061
  }
1119
1062
  export interface StoppagePlay {
@@ -1156,9 +1099,9 @@ export interface SummaryThreeStar {
1156
1099
  goals?: number;
1157
1100
  assists?: number;
1158
1101
  points?: number;
1159
- /** Absent when game=preseason; game=regular; game=shootout. Low sample count */
1102
+ /** Goalies only */
1160
1103
  goalsAgainstAverage?: number;
1161
- /** Absent when game=preseason; game=regular; game=shootout. Low sample count */
1104
+ /** Goalies only */
1162
1105
  savePctg?: number;
1163
1106
  }
1164
1107
  export interface TakeawayDetails {
@@ -19,7 +19,7 @@ export interface ProspectsForward {
19
19
  birthDate: string;
20
20
  birthCity: LocalizedString;
21
21
  birthCountry: string;
22
- /** Absent when team=TOR. Low sample count */
22
+ /** Only for players born in the USA or Canada */
23
23
  birthStateProvince?: LocalizedString;
24
24
  sweaterNumber?: number;
25
25
  }
@@ -28,7 +28,6 @@ export interface ProspectsGoalie {
28
28
  headshot: string;
29
29
  firstName: LocalizedString;
30
30
  lastName: LocalizedString;
31
- /** Low sample count */
32
31
  sweaterNumber?: number;
33
32
  positionCode: PositionCode;
34
33
  shootsCatches: ShootsCatches;