@bp1222/stats-api 0.2.3 → 0.2.5
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/dist/index.d.mts +183 -100
- package/dist/index.d.ts +183 -100
- package/dist/index.js +546 -176
- package/dist/index.mjs +488 -168
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -335,6 +335,66 @@ var TextApiResponse = class {
|
|
|
335
335
|
}
|
|
336
336
|
};
|
|
337
337
|
|
|
338
|
+
// src/models/Official.ts
|
|
339
|
+
function instanceOfOfficial(value) {
|
|
340
|
+
return true;
|
|
341
|
+
}
|
|
342
|
+
function OfficialFromJSON(json) {
|
|
343
|
+
return OfficialFromJSONTyped(json, false);
|
|
344
|
+
}
|
|
345
|
+
function OfficialFromJSONTyped(json, ignoreDiscriminator) {
|
|
346
|
+
if (json == null) {
|
|
347
|
+
return json;
|
|
348
|
+
}
|
|
349
|
+
return {
|
|
350
|
+
"id": json["id"] == null ? void 0 : json["id"],
|
|
351
|
+
"fullName": json["fullName"] == null ? void 0 : json["fullName"],
|
|
352
|
+
"link": json["link"] == null ? void 0 : json["link"]
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
function OfficialToJSON(json) {
|
|
356
|
+
return OfficialToJSONTyped(json, false);
|
|
357
|
+
}
|
|
358
|
+
function OfficialToJSONTyped(value, ignoreDiscriminator = false) {
|
|
359
|
+
if (value == null) {
|
|
360
|
+
return value;
|
|
361
|
+
}
|
|
362
|
+
return {
|
|
363
|
+
"id": value["id"],
|
|
364
|
+
"fullName": value["fullName"],
|
|
365
|
+
"link": value["link"]
|
|
366
|
+
};
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
// src/models/GameOfficial.ts
|
|
370
|
+
function instanceOfGameOfficial(value) {
|
|
371
|
+
return true;
|
|
372
|
+
}
|
|
373
|
+
function GameOfficialFromJSON(json) {
|
|
374
|
+
return GameOfficialFromJSONTyped(json, false);
|
|
375
|
+
}
|
|
376
|
+
function GameOfficialFromJSONTyped(json, ignoreDiscriminator) {
|
|
377
|
+
if (json == null) {
|
|
378
|
+
return json;
|
|
379
|
+
}
|
|
380
|
+
return {
|
|
381
|
+
"official": json["official"] == null ? void 0 : OfficialFromJSON(json["official"]),
|
|
382
|
+
"officialType": json["officialType"] == null ? void 0 : json["officialType"]
|
|
383
|
+
};
|
|
384
|
+
}
|
|
385
|
+
function GameOfficialToJSON(json) {
|
|
386
|
+
return GameOfficialToJSONTyped(json, false);
|
|
387
|
+
}
|
|
388
|
+
function GameOfficialToJSONTyped(value, ignoreDiscriminator = false) {
|
|
389
|
+
if (value == null) {
|
|
390
|
+
return value;
|
|
391
|
+
}
|
|
392
|
+
return {
|
|
393
|
+
"official": OfficialToJSON(value["official"]),
|
|
394
|
+
"officialType": value["officialType"]
|
|
395
|
+
};
|
|
396
|
+
}
|
|
397
|
+
|
|
338
398
|
// src/models/LeagueDates.ts
|
|
339
399
|
function instanceOfLeagueDates(value) {
|
|
340
400
|
return true;
|
|
@@ -359,7 +419,10 @@ function LeagueDatesFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
359
419
|
"gameLevelGamedayType": json["gameLevelGamedayType"] == null ? void 0 : json["gameLevelGamedayType"]
|
|
360
420
|
};
|
|
361
421
|
}
|
|
362
|
-
function LeagueDatesToJSON(
|
|
422
|
+
function LeagueDatesToJSON(json) {
|
|
423
|
+
return LeagueDatesToJSONTyped(json, false);
|
|
424
|
+
}
|
|
425
|
+
function LeagueDatesToJSONTyped(value, ignoreDiscriminator = false) {
|
|
363
426
|
if (value == null) {
|
|
364
427
|
return value;
|
|
365
428
|
}
|
|
@@ -409,7 +472,10 @@ function LeagueFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
409
472
|
"active": json["active"] == null ? void 0 : json["active"]
|
|
410
473
|
};
|
|
411
474
|
}
|
|
412
|
-
function LeagueToJSON(
|
|
475
|
+
function LeagueToJSON(json) {
|
|
476
|
+
return LeagueToJSONTyped(json, false);
|
|
477
|
+
}
|
|
478
|
+
function LeagueToJSONTyped(value, ignoreDiscriminator = false) {
|
|
413
479
|
if (value == null) {
|
|
414
480
|
return value;
|
|
415
481
|
}
|
|
@@ -455,7 +521,10 @@ function SportFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
455
521
|
"activeStatus": json["activeStatus"] == null ? void 0 : json["activeStatus"]
|
|
456
522
|
};
|
|
457
523
|
}
|
|
458
|
-
function SportToJSON(
|
|
524
|
+
function SportToJSON(json) {
|
|
525
|
+
return SportToJSONTyped(json, false);
|
|
526
|
+
}
|
|
527
|
+
function SportToJSONTyped(value, ignoreDiscriminator = false) {
|
|
459
528
|
if (value == null) {
|
|
460
529
|
return value;
|
|
461
530
|
}
|
|
@@ -470,6 +539,43 @@ function SportToJSON(value) {
|
|
|
470
539
|
};
|
|
471
540
|
}
|
|
472
541
|
|
|
542
|
+
// src/models/Venue.ts
|
|
543
|
+
function instanceOfVenue(value) {
|
|
544
|
+
if (!("id" in value) || value["id"] === void 0) return false;
|
|
545
|
+
if (!("name" in value) || value["name"] === void 0) return false;
|
|
546
|
+
return true;
|
|
547
|
+
}
|
|
548
|
+
function VenueFromJSON(json) {
|
|
549
|
+
return VenueFromJSONTyped(json, false);
|
|
550
|
+
}
|
|
551
|
+
function VenueFromJSONTyped(json, ignoreDiscriminator) {
|
|
552
|
+
if (json == null) {
|
|
553
|
+
return json;
|
|
554
|
+
}
|
|
555
|
+
return {
|
|
556
|
+
"id": json["id"],
|
|
557
|
+
"name": json["name"],
|
|
558
|
+
"link": json["link"] == null ? void 0 : json["link"],
|
|
559
|
+
"active": json["active"] == null ? void 0 : json["active"],
|
|
560
|
+
"season": json["season"] == null ? void 0 : json["season"]
|
|
561
|
+
};
|
|
562
|
+
}
|
|
563
|
+
function VenueToJSON(json) {
|
|
564
|
+
return VenueToJSONTyped(json, false);
|
|
565
|
+
}
|
|
566
|
+
function VenueToJSONTyped(value, ignoreDiscriminator = false) {
|
|
567
|
+
if (value == null) {
|
|
568
|
+
return value;
|
|
569
|
+
}
|
|
570
|
+
return {
|
|
571
|
+
"id": value["id"],
|
|
572
|
+
"name": value["name"],
|
|
573
|
+
"link": value["link"],
|
|
574
|
+
"active": value["active"],
|
|
575
|
+
"season": value["season"]
|
|
576
|
+
};
|
|
577
|
+
}
|
|
578
|
+
|
|
473
579
|
// src/models/Division.ts
|
|
474
580
|
function instanceOfDivision(value) {
|
|
475
581
|
if (!("id" in value) || value["id"] === void 0) return false;
|
|
@@ -498,7 +604,10 @@ function DivisionFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
498
604
|
"active": json["active"] == null ? void 0 : json["active"]
|
|
499
605
|
};
|
|
500
606
|
}
|
|
501
|
-
function DivisionToJSON(
|
|
607
|
+
function DivisionToJSON(json) {
|
|
608
|
+
return DivisionToJSONTyped(json, false);
|
|
609
|
+
}
|
|
610
|
+
function DivisionToJSONTyped(value, ignoreDiscriminator = false) {
|
|
502
611
|
if (value == null) {
|
|
503
612
|
return value;
|
|
504
613
|
}
|
|
@@ -519,10 +628,11 @@ function DivisionToJSON(value) {
|
|
|
519
628
|
}
|
|
520
629
|
|
|
521
630
|
// src/models/Streak.ts
|
|
522
|
-
var StreakStreakTypeEnum = {
|
|
523
|
-
Losing
|
|
524
|
-
Winning
|
|
525
|
-
|
|
631
|
+
var StreakStreakTypeEnum = /* @__PURE__ */ ((StreakStreakTypeEnum2) => {
|
|
632
|
+
StreakStreakTypeEnum2["Losing"] = "losses";
|
|
633
|
+
StreakStreakTypeEnum2["Winning"] = "wins";
|
|
634
|
+
return StreakStreakTypeEnum2;
|
|
635
|
+
})(StreakStreakTypeEnum || {});
|
|
526
636
|
function instanceOfStreak(value) {
|
|
527
637
|
return true;
|
|
528
638
|
}
|
|
@@ -537,112 +647,15 @@ function StreakFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
537
647
|
"streakType": json["streakType"] == null ? void 0 : json["streakType"]
|
|
538
648
|
};
|
|
539
649
|
}
|
|
540
|
-
function StreakToJSON(
|
|
541
|
-
|
|
542
|
-
return value;
|
|
543
|
-
}
|
|
544
|
-
return {
|
|
545
|
-
"streakType": value["streakType"]
|
|
546
|
-
};
|
|
650
|
+
function StreakToJSON(json) {
|
|
651
|
+
return StreakToJSONTyped(json, false);
|
|
547
652
|
}
|
|
548
|
-
|
|
549
|
-
// src/models/Venue.ts
|
|
550
|
-
function instanceOfVenue(value) {
|
|
551
|
-
if (!("id" in value) || value["id"] === void 0) return false;
|
|
552
|
-
if (!("name" in value) || value["name"] === void 0) return false;
|
|
553
|
-
return true;
|
|
554
|
-
}
|
|
555
|
-
function VenueFromJSON(json) {
|
|
556
|
-
return VenueFromJSONTyped(json, false);
|
|
557
|
-
}
|
|
558
|
-
function VenueFromJSONTyped(json, ignoreDiscriminator) {
|
|
559
|
-
if (json == null) {
|
|
560
|
-
return json;
|
|
561
|
-
}
|
|
562
|
-
return {
|
|
563
|
-
"id": json["id"],
|
|
564
|
-
"name": json["name"],
|
|
565
|
-
"link": json["link"] == null ? void 0 : json["link"],
|
|
566
|
-
"active": json["active"] == null ? void 0 : json["active"],
|
|
567
|
-
"season": json["season"] == null ? void 0 : json["season"]
|
|
568
|
-
};
|
|
569
|
-
}
|
|
570
|
-
function VenueToJSON(value) {
|
|
571
|
-
if (value == null) {
|
|
572
|
-
return value;
|
|
573
|
-
}
|
|
574
|
-
return {
|
|
575
|
-
"id": value["id"],
|
|
576
|
-
"name": value["name"],
|
|
577
|
-
"link": value["link"],
|
|
578
|
-
"active": value["active"],
|
|
579
|
-
"season": value["season"]
|
|
580
|
-
};
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
// src/models/Team.ts
|
|
584
|
-
function instanceOfTeam(value) {
|
|
585
|
-
if (!("id" in value) || value["id"] === void 0) return false;
|
|
586
|
-
if (!("name" in value) || value["name"] === void 0) return false;
|
|
587
|
-
return true;
|
|
588
|
-
}
|
|
589
|
-
function TeamFromJSON(json) {
|
|
590
|
-
return TeamFromJSONTyped(json, false);
|
|
591
|
-
}
|
|
592
|
-
function TeamFromJSONTyped(json, ignoreDiscriminator) {
|
|
593
|
-
if (json == null) {
|
|
594
|
-
return json;
|
|
595
|
-
}
|
|
596
|
-
return {
|
|
597
|
-
"id": json["id"],
|
|
598
|
-
"name": json["name"],
|
|
599
|
-
"link": json["link"] == null ? void 0 : json["link"],
|
|
600
|
-
"allStarStatus": json["allStarStatus"] == null ? void 0 : json["allStarStatus"],
|
|
601
|
-
"season": json["season"] == null ? void 0 : json["season"],
|
|
602
|
-
"venue": json["venue"] == null ? void 0 : VenueFromJSON(json["venue"]),
|
|
603
|
-
"springVenue": json["springVenue"] == null ? void 0 : VenueFromJSON(json["springVenue"]),
|
|
604
|
-
"teamCode": json["teamCode"] == null ? void 0 : json["teamCode"],
|
|
605
|
-
"fileCode": json["fileCode"] == null ? void 0 : json["fileCode"],
|
|
606
|
-
"abbreviation": json["abbreviation"] == null ? void 0 : json["abbreviation"],
|
|
607
|
-
"teamName": json["teamName"] == null ? void 0 : json["teamName"],
|
|
608
|
-
"locationName": json["locationName"] == null ? void 0 : json["locationName"],
|
|
609
|
-
"firstYearOfPlay": json["firstYearOfPlay"] == null ? void 0 : json["firstYearOfPlay"],
|
|
610
|
-
"league": json["league"] == null ? void 0 : LeagueFromJSON(json["league"]),
|
|
611
|
-
"springLeague": json["springLeague"] == null ? void 0 : LeagueFromJSON(json["springLeague"]),
|
|
612
|
-
"division": json["division"] == null ? void 0 : DivisionFromJSON(json["division"]),
|
|
613
|
-
"sport": json["sport"] == null ? void 0 : SportFromJSON(json["sport"]),
|
|
614
|
-
"shortName": json["shortName"] == null ? void 0 : json["shortName"],
|
|
615
|
-
"franchiseName": json["franchiseName"] == null ? void 0 : json["franchiseName"],
|
|
616
|
-
"clubName": json["clubName"] == null ? void 0 : json["clubName"],
|
|
617
|
-
"active": json["active"] == null ? void 0 : json["active"]
|
|
618
|
-
};
|
|
619
|
-
}
|
|
620
|
-
function TeamToJSON(value) {
|
|
653
|
+
function StreakToJSONTyped(value, ignoreDiscriminator = false) {
|
|
621
654
|
if (value == null) {
|
|
622
655
|
return value;
|
|
623
656
|
}
|
|
624
657
|
return {
|
|
625
|
-
"
|
|
626
|
-
"name": value["name"],
|
|
627
|
-
"link": value["link"],
|
|
628
|
-
"allStarStatus": value["allStarStatus"],
|
|
629
|
-
"season": value["season"],
|
|
630
|
-
"venue": VenueToJSON(value["venue"]),
|
|
631
|
-
"springVenue": VenueToJSON(value["springVenue"]),
|
|
632
|
-
"teamCode": value["teamCode"],
|
|
633
|
-
"fileCode": value["fileCode"],
|
|
634
|
-
"abbreviation": value["abbreviation"],
|
|
635
|
-
"teamName": value["teamName"],
|
|
636
|
-
"locationName": value["locationName"],
|
|
637
|
-
"firstYearOfPlay": value["firstYearOfPlay"],
|
|
638
|
-
"league": LeagueToJSON(value["league"]),
|
|
639
|
-
"springLeague": LeagueToJSON(value["springLeague"]),
|
|
640
|
-
"division": DivisionToJSON(value["division"]),
|
|
641
|
-
"sport": SportToJSON(value["sport"]),
|
|
642
|
-
"shortName": value["shortName"],
|
|
643
|
-
"franchiseName": value["franchiseName"],
|
|
644
|
-
"clubName": value["clubName"],
|
|
645
|
-
"active": value["active"]
|
|
658
|
+
"streakType": value["streakType"]
|
|
646
659
|
};
|
|
647
660
|
}
|
|
648
661
|
|
|
@@ -667,7 +680,10 @@ function LeagueRecordFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
667
680
|
"pct": json["pct"]
|
|
668
681
|
};
|
|
669
682
|
}
|
|
670
|
-
function LeagueRecordToJSON(
|
|
683
|
+
function LeagueRecordToJSON(json) {
|
|
684
|
+
return LeagueRecordToJSONTyped(json, false);
|
|
685
|
+
}
|
|
686
|
+
function LeagueRecordToJSONTyped(value, ignoreDiscriminator = false) {
|
|
671
687
|
if (value == null) {
|
|
672
688
|
return value;
|
|
673
689
|
}
|
|
@@ -679,8 +695,8 @@ function LeagueRecordToJSON(value) {
|
|
|
679
695
|
};
|
|
680
696
|
}
|
|
681
697
|
|
|
682
|
-
// src/models/
|
|
683
|
-
function
|
|
698
|
+
// src/models/Record.ts
|
|
699
|
+
function instanceOfRecord(value) {
|
|
684
700
|
if (!("team" in value) || value["team"] === void 0) return false;
|
|
685
701
|
if (!("season" in value) || value["season"] === void 0) return false;
|
|
686
702
|
if (!("streak" in value) || value["streak"] === void 0) return false;
|
|
@@ -692,10 +708,10 @@ function instanceOfTeamRecord(value) {
|
|
|
692
708
|
if (!("losses" in value) || value["losses"] === void 0) return false;
|
|
693
709
|
return true;
|
|
694
710
|
}
|
|
695
|
-
function
|
|
696
|
-
return
|
|
711
|
+
function RecordFromJSON(json) {
|
|
712
|
+
return RecordFromJSONTyped(json, false);
|
|
697
713
|
}
|
|
698
|
-
function
|
|
714
|
+
function RecordFromJSONTyped(json, ignoreDiscriminator) {
|
|
699
715
|
if (json == null) {
|
|
700
716
|
return json;
|
|
701
717
|
}
|
|
@@ -734,7 +750,10 @@ function TeamRecordFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
734
750
|
"winningPercentage": json["winningPercentage"] == null ? void 0 : json["winningPercentage"]
|
|
735
751
|
};
|
|
736
752
|
}
|
|
737
|
-
function
|
|
753
|
+
function RecordToJSON(json) {
|
|
754
|
+
return RecordToJSONTyped(json, false);
|
|
755
|
+
}
|
|
756
|
+
function RecordToJSONTyped(value, ignoreDiscriminator = false) {
|
|
738
757
|
if (value == null) {
|
|
739
758
|
return value;
|
|
740
759
|
}
|
|
@@ -774,6 +793,135 @@ function TeamRecordToJSON(value) {
|
|
|
774
793
|
};
|
|
775
794
|
}
|
|
776
795
|
|
|
796
|
+
// src/models/Team.ts
|
|
797
|
+
function instanceOfTeam(value) {
|
|
798
|
+
if (!("id" in value) || value["id"] === void 0) return false;
|
|
799
|
+
if (!("name" in value) || value["name"] === void 0) return false;
|
|
800
|
+
return true;
|
|
801
|
+
}
|
|
802
|
+
function TeamFromJSON(json) {
|
|
803
|
+
return TeamFromJSONTyped2(json, false);
|
|
804
|
+
}
|
|
805
|
+
function TeamFromJSONTyped2(json, ignoreDiscriminator) {
|
|
806
|
+
if (json == null) {
|
|
807
|
+
return json;
|
|
808
|
+
}
|
|
809
|
+
return {
|
|
810
|
+
"id": json["id"],
|
|
811
|
+
"name": json["name"],
|
|
812
|
+
"link": json["link"] == null ? void 0 : json["link"],
|
|
813
|
+
"allStarStatus": json["allStarStatus"] == null ? void 0 : json["allStarStatus"],
|
|
814
|
+
"season": json["season"] == null ? void 0 : json["season"],
|
|
815
|
+
"venue": json["venue"] == null ? void 0 : VenueFromJSON(json["venue"]),
|
|
816
|
+
"springVenue": json["springVenue"] == null ? void 0 : VenueFromJSON(json["springVenue"]),
|
|
817
|
+
"teamCode": json["teamCode"] == null ? void 0 : json["teamCode"],
|
|
818
|
+
"fileCode": json["fileCode"] == null ? void 0 : json["fileCode"],
|
|
819
|
+
"abbreviation": json["abbreviation"] == null ? void 0 : json["abbreviation"],
|
|
820
|
+
"teamName": json["teamName"] == null ? void 0 : json["teamName"],
|
|
821
|
+
"locationName": json["locationName"] == null ? void 0 : json["locationName"],
|
|
822
|
+
"firstYearOfPlay": json["firstYearOfPlay"] == null ? void 0 : json["firstYearOfPlay"],
|
|
823
|
+
"league": json["league"] == null ? void 0 : LeagueFromJSON(json["league"]),
|
|
824
|
+
"springLeague": json["springLeague"] == null ? void 0 : LeagueFromJSON(json["springLeague"]),
|
|
825
|
+
"division": json["division"] == null ? void 0 : DivisionFromJSON(json["division"]),
|
|
826
|
+
"sport": json["sport"] == null ? void 0 : SportFromJSON(json["sport"]),
|
|
827
|
+
"record": json["record"] == null ? void 0 : RecordFromJSON(json["record"]),
|
|
828
|
+
"shortName": json["shortName"] == null ? void 0 : json["shortName"],
|
|
829
|
+
"franchiseName": json["franchiseName"] == null ? void 0 : json["franchiseName"],
|
|
830
|
+
"clubName": json["clubName"] == null ? void 0 : json["clubName"],
|
|
831
|
+
"active": json["active"] == null ? void 0 : json["active"]
|
|
832
|
+
};
|
|
833
|
+
}
|
|
834
|
+
function TeamToJSON(json) {
|
|
835
|
+
return TeamToJSONTyped2(json, false);
|
|
836
|
+
}
|
|
837
|
+
function TeamToJSONTyped2(value, ignoreDiscriminator = false) {
|
|
838
|
+
if (value == null) {
|
|
839
|
+
return value;
|
|
840
|
+
}
|
|
841
|
+
return {
|
|
842
|
+
"id": value["id"],
|
|
843
|
+
"name": value["name"],
|
|
844
|
+
"link": value["link"],
|
|
845
|
+
"allStarStatus": value["allStarStatus"],
|
|
846
|
+
"season": value["season"],
|
|
847
|
+
"venue": VenueToJSON(value["venue"]),
|
|
848
|
+
"springVenue": VenueToJSON(value["springVenue"]),
|
|
849
|
+
"teamCode": value["teamCode"],
|
|
850
|
+
"fileCode": value["fileCode"],
|
|
851
|
+
"abbreviation": value["abbreviation"],
|
|
852
|
+
"teamName": value["teamName"],
|
|
853
|
+
"locationName": value["locationName"],
|
|
854
|
+
"firstYearOfPlay": value["firstYearOfPlay"],
|
|
855
|
+
"league": LeagueToJSON(value["league"]),
|
|
856
|
+
"springLeague": LeagueToJSON(value["springLeague"]),
|
|
857
|
+
"division": DivisionToJSON(value["division"]),
|
|
858
|
+
"sport": SportToJSON(value["sport"]),
|
|
859
|
+
"record": RecordToJSON(value["record"]),
|
|
860
|
+
"shortName": value["shortName"],
|
|
861
|
+
"franchiseName": value["franchiseName"],
|
|
862
|
+
"clubName": value["clubName"],
|
|
863
|
+
"active": value["active"]
|
|
864
|
+
};
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
// src/models/BoxscoreTeams.ts
|
|
868
|
+
function instanceOfBoxscoreTeams(value) {
|
|
869
|
+
return true;
|
|
870
|
+
}
|
|
871
|
+
function BoxscoreTeamsFromJSON(json) {
|
|
872
|
+
return BoxscoreTeamsFromJSONTyped(json, false);
|
|
873
|
+
}
|
|
874
|
+
function BoxscoreTeamsFromJSONTyped(json, ignoreDiscriminator) {
|
|
875
|
+
if (json == null) {
|
|
876
|
+
return json;
|
|
877
|
+
}
|
|
878
|
+
return {
|
|
879
|
+
"away": json["away"] == null ? void 0 : TeamFromJSON(json["away"]),
|
|
880
|
+
"home": json["home"] == null ? void 0 : TeamFromJSON(json["home"])
|
|
881
|
+
};
|
|
882
|
+
}
|
|
883
|
+
function BoxscoreTeamsToJSON(json) {
|
|
884
|
+
return BoxscoreTeamsToJSONTyped(json, false);
|
|
885
|
+
}
|
|
886
|
+
function BoxscoreTeamsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
887
|
+
if (value == null) {
|
|
888
|
+
return value;
|
|
889
|
+
}
|
|
890
|
+
return {
|
|
891
|
+
"away": TeamToJSON(value["away"]),
|
|
892
|
+
"home": TeamToJSON(value["home"])
|
|
893
|
+
};
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
// src/models/Boxscore.ts
|
|
897
|
+
function instanceOfBoxscore(value) {
|
|
898
|
+
return true;
|
|
899
|
+
}
|
|
900
|
+
function BoxscoreFromJSON(json) {
|
|
901
|
+
return BoxscoreFromJSONTyped(json, false);
|
|
902
|
+
}
|
|
903
|
+
function BoxscoreFromJSONTyped(json, ignoreDiscriminator) {
|
|
904
|
+
if (json == null) {
|
|
905
|
+
return json;
|
|
906
|
+
}
|
|
907
|
+
return {
|
|
908
|
+
"teams": json["teams"] == null ? void 0 : BoxscoreTeamsFromJSON(json["teams"]),
|
|
909
|
+
"officials": json["officials"] == null ? void 0 : json["officials"].map(GameOfficialFromJSON)
|
|
910
|
+
};
|
|
911
|
+
}
|
|
912
|
+
function BoxscoreToJSON(json) {
|
|
913
|
+
return BoxscoreToJSONTyped(json, false);
|
|
914
|
+
}
|
|
915
|
+
function BoxscoreToJSONTyped(value, ignoreDiscriminator = false) {
|
|
916
|
+
if (value == null) {
|
|
917
|
+
return value;
|
|
918
|
+
}
|
|
919
|
+
return {
|
|
920
|
+
"teams": BoxscoreTeamsToJSON(value["teams"]),
|
|
921
|
+
"officials": value["officials"] == null ? void 0 : value["officials"].map(GameOfficialToJSON)
|
|
922
|
+
};
|
|
923
|
+
}
|
|
924
|
+
|
|
777
925
|
// src/models/DivisionStandings.ts
|
|
778
926
|
function instanceOfDivisionStandings(value) {
|
|
779
927
|
if (!("league" in value) || value["league"] === void 0) return false;
|
|
@@ -795,10 +943,13 @@ function DivisionStandingsFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
795
943
|
"division": DivisionFromJSON(json["division"]),
|
|
796
944
|
"sport": SportFromJSON(json["sport"]),
|
|
797
945
|
"lastUpdated": json["lastUpdated"] == null ? void 0 : json["lastUpdated"],
|
|
798
|
-
"teamRecords": json["teamRecords"].map(
|
|
946
|
+
"teamRecords": json["teamRecords"].map(RecordFromJSON)
|
|
799
947
|
};
|
|
800
948
|
}
|
|
801
|
-
function DivisionStandingsToJSON(
|
|
949
|
+
function DivisionStandingsToJSON(json) {
|
|
950
|
+
return DivisionStandingsToJSONTyped(json, false);
|
|
951
|
+
}
|
|
952
|
+
function DivisionStandingsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
802
953
|
if (value == null) {
|
|
803
954
|
return value;
|
|
804
955
|
}
|
|
@@ -808,7 +959,7 @@ function DivisionStandingsToJSON(value) {
|
|
|
808
959
|
"division": DivisionToJSON(value["division"]),
|
|
809
960
|
"sport": SportToJSON(value["sport"]),
|
|
810
961
|
"lastUpdated": value["lastUpdated"],
|
|
811
|
-
"teamRecords": value["teamRecords"].map(
|
|
962
|
+
"teamRecords": value["teamRecords"].map(RecordToJSON)
|
|
812
963
|
};
|
|
813
964
|
}
|
|
814
965
|
|
|
@@ -827,7 +978,10 @@ function DivisionStandingsListFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
827
978
|
"records": json["records"] == null ? void 0 : json["records"].map(DivisionStandingsFromJSON)
|
|
828
979
|
};
|
|
829
980
|
}
|
|
830
|
-
function DivisionStandingsListToJSON(
|
|
981
|
+
function DivisionStandingsListToJSON(json) {
|
|
982
|
+
return DivisionStandingsListToJSONTyped(json, false);
|
|
983
|
+
}
|
|
984
|
+
function DivisionStandingsListToJSONTyped(value, ignoreDiscriminator = false) {
|
|
831
985
|
if (value == null) {
|
|
832
986
|
return value;
|
|
833
987
|
}
|
|
@@ -837,15 +991,16 @@ function DivisionStandingsListToJSON(value) {
|
|
|
837
991
|
}
|
|
838
992
|
|
|
839
993
|
// src/models/GameStatusCode.ts
|
|
840
|
-
var GameStatusCode = {
|
|
841
|
-
Final
|
|
842
|
-
Postponed
|
|
843
|
-
Scheduled
|
|
844
|
-
InProgress
|
|
845
|
-
Pregame
|
|
846
|
-
GameOver
|
|
847
|
-
Canceled
|
|
848
|
-
|
|
994
|
+
var GameStatusCode = /* @__PURE__ */ ((GameStatusCode2) => {
|
|
995
|
+
GameStatusCode2["Final"] = "F";
|
|
996
|
+
GameStatusCode2["Postponed"] = "D";
|
|
997
|
+
GameStatusCode2["Scheduled"] = "S";
|
|
998
|
+
GameStatusCode2["InProgress"] = "I";
|
|
999
|
+
GameStatusCode2["Pregame"] = "P";
|
|
1000
|
+
GameStatusCode2["GameOver"] = "O";
|
|
1001
|
+
GameStatusCode2["Canceled"] = "C";
|
|
1002
|
+
return GameStatusCode2;
|
|
1003
|
+
})(GameStatusCode || {});
|
|
849
1004
|
function instanceOfGameStatusCode(value) {
|
|
850
1005
|
for (const key in GameStatusCode) {
|
|
851
1006
|
if (Object.prototype.hasOwnProperty.call(GameStatusCode, key)) {
|
|
@@ -865,6 +1020,9 @@ function GameStatusCodeFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
865
1020
|
function GameStatusCodeToJSON(value) {
|
|
866
1021
|
return value;
|
|
867
1022
|
}
|
|
1023
|
+
function GameStatusCodeToJSONTyped(value, ignoreDiscriminator) {
|
|
1024
|
+
return value;
|
|
1025
|
+
}
|
|
868
1026
|
|
|
869
1027
|
// src/models/GameStatus.ts
|
|
870
1028
|
function instanceOfGameStatus(value) {
|
|
@@ -886,7 +1044,10 @@ function GameStatusFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
886
1044
|
"abstractGameCode": json["abstractGameCode"] == null ? void 0 : json["abstractGameCode"]
|
|
887
1045
|
};
|
|
888
1046
|
}
|
|
889
|
-
function GameStatusToJSON(
|
|
1047
|
+
function GameStatusToJSON(json) {
|
|
1048
|
+
return GameStatusToJSONTyped(json, false);
|
|
1049
|
+
}
|
|
1050
|
+
function GameStatusToJSONTyped(value, ignoreDiscriminator = false) {
|
|
890
1051
|
if (value == null) {
|
|
891
1052
|
return value;
|
|
892
1053
|
}
|
|
@@ -923,7 +1084,10 @@ function GameTeamFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
923
1084
|
"seriesNumber": json["seriesNumber"] == null ? void 0 : json["seriesNumber"]
|
|
924
1085
|
};
|
|
925
1086
|
}
|
|
926
|
-
function GameTeamToJSON(
|
|
1087
|
+
function GameTeamToJSON(json) {
|
|
1088
|
+
return GameTeamToJSONTyped(json, false);
|
|
1089
|
+
}
|
|
1090
|
+
function GameTeamToJSONTyped(value, ignoreDiscriminator = false) {
|
|
927
1091
|
if (value == null) {
|
|
928
1092
|
return value;
|
|
929
1093
|
}
|
|
@@ -955,7 +1119,10 @@ function GameTeamsFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
955
1119
|
"home": GameTeamFromJSON(json["home"])
|
|
956
1120
|
};
|
|
957
1121
|
}
|
|
958
|
-
function GameTeamsToJSON(
|
|
1122
|
+
function GameTeamsToJSON(json) {
|
|
1123
|
+
return GameTeamsToJSONTyped(json, false);
|
|
1124
|
+
}
|
|
1125
|
+
function GameTeamsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
959
1126
|
if (value == null) {
|
|
960
1127
|
return value;
|
|
961
1128
|
}
|
|
@@ -966,15 +1133,16 @@ function GameTeamsToJSON(value) {
|
|
|
966
1133
|
}
|
|
967
1134
|
|
|
968
1135
|
// src/models/GameType.ts
|
|
969
|
-
var GameType = {
|
|
970
|
-
Exhibition
|
|
971
|
-
SpringTraining
|
|
972
|
-
Regular
|
|
973
|
-
WildCardSeries
|
|
974
|
-
DivisionSeries
|
|
975
|
-
LeagueChampionshipSeries
|
|
976
|
-
WorldSeries
|
|
977
|
-
|
|
1136
|
+
var GameType = /* @__PURE__ */ ((GameType2) => {
|
|
1137
|
+
GameType2["Exhibition"] = "E";
|
|
1138
|
+
GameType2["SpringTraining"] = "S";
|
|
1139
|
+
GameType2["Regular"] = "R";
|
|
1140
|
+
GameType2["WildCardSeries"] = "F";
|
|
1141
|
+
GameType2["DivisionSeries"] = "D";
|
|
1142
|
+
GameType2["LeagueChampionshipSeries"] = "L";
|
|
1143
|
+
GameType2["WorldSeries"] = "W";
|
|
1144
|
+
return GameType2;
|
|
1145
|
+
})(GameType || {});
|
|
978
1146
|
function instanceOfGameType(value) {
|
|
979
1147
|
for (const key in GameType) {
|
|
980
1148
|
if (Object.prototype.hasOwnProperty.call(GameType, key)) {
|
|
@@ -994,6 +1162,9 @@ function GameTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
994
1162
|
function GameTypeToJSON(value) {
|
|
995
1163
|
return value;
|
|
996
1164
|
}
|
|
1165
|
+
function GameTypeToJSONTyped(value, ignoreDiscriminator) {
|
|
1166
|
+
return value;
|
|
1167
|
+
}
|
|
997
1168
|
|
|
998
1169
|
// src/models/Game.ts
|
|
999
1170
|
function instanceOfGame(value) {
|
|
@@ -1053,7 +1224,10 @@ function GameFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
1053
1224
|
"ifNecessaryDescription": json["ifNecessaryDescription"] == null ? void 0 : json["ifNecessaryDescription"]
|
|
1054
1225
|
};
|
|
1055
1226
|
}
|
|
1056
|
-
function GameToJSON(
|
|
1227
|
+
function GameToJSON(json) {
|
|
1228
|
+
return GameToJSONTyped(json, false);
|
|
1229
|
+
}
|
|
1230
|
+
function GameToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1057
1231
|
if (value == null) {
|
|
1058
1232
|
return value;
|
|
1059
1233
|
}
|
|
@@ -1094,28 +1268,33 @@ function GameToJSON(value) {
|
|
|
1094
1268
|
};
|
|
1095
1269
|
}
|
|
1096
1270
|
|
|
1097
|
-
// src/models/
|
|
1098
|
-
function
|
|
1271
|
+
// src/models/LinescoreTeam.ts
|
|
1272
|
+
function instanceOfLinescoreTeam(value) {
|
|
1099
1273
|
return true;
|
|
1100
1274
|
}
|
|
1101
|
-
function
|
|
1102
|
-
return
|
|
1275
|
+
function LinescoreTeamFromJSON(json) {
|
|
1276
|
+
return LinescoreTeamFromJSONTyped(json, false);
|
|
1103
1277
|
}
|
|
1104
|
-
function
|
|
1278
|
+
function LinescoreTeamFromJSONTyped(json, ignoreDiscriminator) {
|
|
1105
1279
|
if (json == null) {
|
|
1106
1280
|
return json;
|
|
1107
1281
|
}
|
|
1108
1282
|
return {
|
|
1283
|
+
"runs": json["runs"] == null ? void 0 : json["runs"],
|
|
1109
1284
|
"hits": json["hits"] == null ? void 0 : json["hits"],
|
|
1110
1285
|
"errors": json["errors"] == null ? void 0 : json["errors"],
|
|
1111
1286
|
"leftOnBase": json["leftOnBase"] == null ? void 0 : json["leftOnBase"]
|
|
1112
1287
|
};
|
|
1113
1288
|
}
|
|
1114
|
-
function
|
|
1289
|
+
function LinescoreTeamToJSON(json) {
|
|
1290
|
+
return LinescoreTeamToJSONTyped(json, false);
|
|
1291
|
+
}
|
|
1292
|
+
function LinescoreTeamToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1115
1293
|
if (value == null) {
|
|
1116
1294
|
return value;
|
|
1117
1295
|
}
|
|
1118
1296
|
return {
|
|
1297
|
+
"runs": value["runs"],
|
|
1119
1298
|
"hits": value["hits"],
|
|
1120
1299
|
"errors": value["errors"],
|
|
1121
1300
|
"leftOnBase": value["leftOnBase"]
|
|
@@ -1136,19 +1315,51 @@ function InningFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
1136
1315
|
return {
|
|
1137
1316
|
"num": json["num"] == null ? void 0 : json["num"],
|
|
1138
1317
|
"ordinalNum": json["ordinalNum"] == null ? void 0 : json["ordinalNum"],
|
|
1139
|
-
"home": json["home"] == null ? void 0 :
|
|
1140
|
-
"away": json["away"] == null ? void 0 :
|
|
1318
|
+
"home": json["home"] == null ? void 0 : LinescoreTeamFromJSON(json["home"]),
|
|
1319
|
+
"away": json["away"] == null ? void 0 : LinescoreTeamFromJSON(json["away"])
|
|
1141
1320
|
};
|
|
1142
1321
|
}
|
|
1143
|
-
function InningToJSON(
|
|
1322
|
+
function InningToJSON(json) {
|
|
1323
|
+
return InningToJSONTyped(json, false);
|
|
1324
|
+
}
|
|
1325
|
+
function InningToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1144
1326
|
if (value == null) {
|
|
1145
1327
|
return value;
|
|
1146
1328
|
}
|
|
1147
1329
|
return {
|
|
1148
1330
|
"num": value["num"],
|
|
1149
1331
|
"ordinalNum": value["ordinalNum"],
|
|
1150
|
-
"home":
|
|
1151
|
-
"away":
|
|
1332
|
+
"home": LinescoreTeamToJSON(value["home"]),
|
|
1333
|
+
"away": LinescoreTeamToJSON(value["away"])
|
|
1334
|
+
};
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
// src/models/LinescoreTeams.ts
|
|
1338
|
+
function instanceOfLinescoreTeams(value) {
|
|
1339
|
+
return true;
|
|
1340
|
+
}
|
|
1341
|
+
function LinescoreTeamsFromJSON(json) {
|
|
1342
|
+
return LinescoreTeamsFromJSONTyped(json, false);
|
|
1343
|
+
}
|
|
1344
|
+
function LinescoreTeamsFromJSONTyped(json, ignoreDiscriminator) {
|
|
1345
|
+
if (json == null) {
|
|
1346
|
+
return json;
|
|
1347
|
+
}
|
|
1348
|
+
return {
|
|
1349
|
+
"away": json["away"] == null ? void 0 : LinescoreTeamFromJSON(json["away"]),
|
|
1350
|
+
"home": json["home"] == null ? void 0 : LinescoreTeamFromJSON(json["home"])
|
|
1351
|
+
};
|
|
1352
|
+
}
|
|
1353
|
+
function LinescoreTeamsToJSON(json) {
|
|
1354
|
+
return LinescoreTeamsToJSONTyped(json, false);
|
|
1355
|
+
}
|
|
1356
|
+
function LinescoreTeamsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1357
|
+
if (value == null) {
|
|
1358
|
+
return value;
|
|
1359
|
+
}
|
|
1360
|
+
return {
|
|
1361
|
+
"away": LinescoreTeamToJSON(value["away"]),
|
|
1362
|
+
"home": LinescoreTeamToJSON(value["home"])
|
|
1152
1363
|
};
|
|
1153
1364
|
}
|
|
1154
1365
|
|
|
@@ -1171,12 +1382,16 @@ function LinescoreFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
1171
1382
|
"isTopInning": json["isTopInning"] == null ? void 0 : json["isTopInning"],
|
|
1172
1383
|
"scheduledInnings": json["scheduledInnings"] == null ? void 0 : json["scheduledInnings"],
|
|
1173
1384
|
"innings": json["innings"] == null ? void 0 : json["innings"].map(InningFromJSON),
|
|
1385
|
+
"teams": json["teams"] == null ? void 0 : LinescoreTeamsFromJSON(json["teams"]),
|
|
1174
1386
|
"balls": json["balls"] == null ? void 0 : json["balls"],
|
|
1175
1387
|
"strikes": json["strikes"] == null ? void 0 : json["strikes"],
|
|
1176
1388
|
"outs": json["outs"] == null ? void 0 : json["outs"]
|
|
1177
1389
|
};
|
|
1178
1390
|
}
|
|
1179
|
-
function LinescoreToJSON(
|
|
1391
|
+
function LinescoreToJSON(json) {
|
|
1392
|
+
return LinescoreToJSONTyped(json, false);
|
|
1393
|
+
}
|
|
1394
|
+
function LinescoreToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1180
1395
|
if (value == null) {
|
|
1181
1396
|
return value;
|
|
1182
1397
|
}
|
|
@@ -1188,6 +1403,7 @@ function LinescoreToJSON(value) {
|
|
|
1188
1403
|
"isTopInning": value["isTopInning"],
|
|
1189
1404
|
"scheduledInnings": value["scheduledInnings"],
|
|
1190
1405
|
"innings": value["innings"] == null ? void 0 : value["innings"].map(InningToJSON),
|
|
1406
|
+
"teams": LinescoreTeamsToJSON(value["teams"]),
|
|
1191
1407
|
"balls": value["balls"],
|
|
1192
1408
|
"strikes": value["strikes"],
|
|
1193
1409
|
"outs": value["outs"]
|
|
@@ -1215,7 +1431,10 @@ function ScheduleDayFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
1215
1431
|
"games": json["games"].map(GameFromJSON)
|
|
1216
1432
|
};
|
|
1217
1433
|
}
|
|
1218
|
-
function ScheduleDayToJSON(
|
|
1434
|
+
function ScheduleDayToJSON(json) {
|
|
1435
|
+
return ScheduleDayToJSONTyped(json, false);
|
|
1436
|
+
}
|
|
1437
|
+
function ScheduleDayToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1219
1438
|
if (value == null) {
|
|
1220
1439
|
return value;
|
|
1221
1440
|
}
|
|
@@ -1253,7 +1472,10 @@ function ScheduleFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
1253
1472
|
"dates": json["dates"].map(ScheduleDayFromJSON)
|
|
1254
1473
|
};
|
|
1255
1474
|
}
|
|
1256
|
-
function ScheduleToJSON(
|
|
1475
|
+
function ScheduleToJSON(json) {
|
|
1476
|
+
return ScheduleToJSONTyped(json, false);
|
|
1477
|
+
}
|
|
1478
|
+
function ScheduleToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1257
1479
|
if (value == null) {
|
|
1258
1480
|
return value;
|
|
1259
1481
|
}
|
|
@@ -1306,7 +1528,10 @@ function SeasonFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
1306
1528
|
"qualifierOutsPitched": json["qualifierOutsPitched"] == null ? void 0 : json["qualifierOutsPitched"]
|
|
1307
1529
|
};
|
|
1308
1530
|
}
|
|
1309
|
-
function SeasonToJSON(
|
|
1531
|
+
function SeasonToJSON(json) {
|
|
1532
|
+
return SeasonToJSONTyped(json, false);
|
|
1533
|
+
}
|
|
1534
|
+
function SeasonToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1310
1535
|
if (value == null) {
|
|
1311
1536
|
return value;
|
|
1312
1537
|
}
|
|
@@ -1350,7 +1575,10 @@ function SeasonsFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
1350
1575
|
"seasons": json["seasons"] == null ? void 0 : json["seasons"].map(SeasonFromJSON)
|
|
1351
1576
|
};
|
|
1352
1577
|
}
|
|
1353
|
-
function SeasonsToJSON(
|
|
1578
|
+
function SeasonsToJSON(json) {
|
|
1579
|
+
return SeasonsToJSONTyped(json, false);
|
|
1580
|
+
}
|
|
1581
|
+
function SeasonsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1354
1582
|
if (value == null) {
|
|
1355
1583
|
return value;
|
|
1356
1584
|
}
|
|
@@ -1374,7 +1602,10 @@ function TeamsFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
1374
1602
|
"teams": json["teams"] == null ? void 0 : json["teams"].map(TeamFromJSON)
|
|
1375
1603
|
};
|
|
1376
1604
|
}
|
|
1377
|
-
function TeamsToJSON(
|
|
1605
|
+
function TeamsToJSON(json) {
|
|
1606
|
+
return TeamsToJSONTyped(json, false);
|
|
1607
|
+
}
|
|
1608
|
+
function TeamsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1378
1609
|
if (value == null) {
|
|
1379
1610
|
return value;
|
|
1380
1611
|
}
|
|
@@ -1421,6 +1652,42 @@ var MlbApi = class extends BaseAPI {
|
|
|
1421
1652
|
return yield response.value();
|
|
1422
1653
|
});
|
|
1423
1654
|
}
|
|
1655
|
+
/**
|
|
1656
|
+
* Returns Boxscore
|
|
1657
|
+
* Retrieves boxscore
|
|
1658
|
+
*/
|
|
1659
|
+
getBoxscoreRaw(requestParameters, initOverrides) {
|
|
1660
|
+
return __async(this, null, function* () {
|
|
1661
|
+
if (requestParameters["gamePk"] == null) {
|
|
1662
|
+
throw new RequiredError(
|
|
1663
|
+
"gamePk",
|
|
1664
|
+
'Required parameter "gamePk" was null or undefined when calling getBoxscore().'
|
|
1665
|
+
);
|
|
1666
|
+
}
|
|
1667
|
+
const queryParameters = {};
|
|
1668
|
+
if (requestParameters["fields"] != null) {
|
|
1669
|
+
queryParameters["fields"] = requestParameters["fields"].join(COLLECTION_FORMATS["csv"]);
|
|
1670
|
+
}
|
|
1671
|
+
const headerParameters = {};
|
|
1672
|
+
const response = yield this.request({
|
|
1673
|
+
path: `/v1/game/{gamePk}/boxscore`.replace(`{${"gamePk"}}`, encodeURIComponent(String(requestParameters["gamePk"]))),
|
|
1674
|
+
method: "GET",
|
|
1675
|
+
headers: headerParameters,
|
|
1676
|
+
query: queryParameters
|
|
1677
|
+
}, initOverrides);
|
|
1678
|
+
return new JSONApiResponse(response, (jsonValue) => BoxscoreFromJSON(jsonValue));
|
|
1679
|
+
});
|
|
1680
|
+
}
|
|
1681
|
+
/**
|
|
1682
|
+
* Returns Boxscore
|
|
1683
|
+
* Retrieves boxscore
|
|
1684
|
+
*/
|
|
1685
|
+
getBoxscore(requestParameters, initOverrides) {
|
|
1686
|
+
return __async(this, null, function* () {
|
|
1687
|
+
const response = yield this.getBoxscoreRaw(requestParameters, initOverrides);
|
|
1688
|
+
return yield response.value();
|
|
1689
|
+
});
|
|
1690
|
+
}
|
|
1424
1691
|
/**
|
|
1425
1692
|
* Returns Linescore
|
|
1426
1693
|
* Retrieves linescore
|
|
@@ -1434,6 +1701,9 @@ var MlbApi = class extends BaseAPI {
|
|
|
1434
1701
|
);
|
|
1435
1702
|
}
|
|
1436
1703
|
const queryParameters = {};
|
|
1704
|
+
if (requestParameters["fields"] != null) {
|
|
1705
|
+
queryParameters["fields"] = requestParameters["fields"].join(COLLECTION_FORMATS["csv"]);
|
|
1706
|
+
}
|
|
1437
1707
|
const headerParameters = {};
|
|
1438
1708
|
const response = yield this.request({
|
|
1439
1709
|
path: `/v1/game/{gamePk}/linescore`.replace(`{${"gamePk"}}`, encodeURIComponent(String(requestParameters["gamePk"]))),
|
|
@@ -1660,6 +1930,14 @@ export {
|
|
|
1660
1930
|
BASE_PATH,
|
|
1661
1931
|
BaseAPI,
|
|
1662
1932
|
BlobApiResponse,
|
|
1933
|
+
BoxscoreFromJSON,
|
|
1934
|
+
BoxscoreFromJSONTyped,
|
|
1935
|
+
BoxscoreTeamsFromJSON,
|
|
1936
|
+
BoxscoreTeamsFromJSONTyped,
|
|
1937
|
+
BoxscoreTeamsToJSON,
|
|
1938
|
+
BoxscoreTeamsToJSONTyped,
|
|
1939
|
+
BoxscoreToJSON,
|
|
1940
|
+
BoxscoreToJSONTyped,
|
|
1663
1941
|
COLLECTION_FORMATS,
|
|
1664
1942
|
Configuration,
|
|
1665
1943
|
DefaultConfig,
|
|
@@ -1670,100 +1948,143 @@ export {
|
|
|
1670
1948
|
DivisionStandingsListFromJSON,
|
|
1671
1949
|
DivisionStandingsListFromJSONTyped,
|
|
1672
1950
|
DivisionStandingsListToJSON,
|
|
1951
|
+
DivisionStandingsListToJSONTyped,
|
|
1673
1952
|
DivisionStandingsToJSON,
|
|
1953
|
+
DivisionStandingsToJSONTyped,
|
|
1674
1954
|
DivisionToJSON,
|
|
1955
|
+
DivisionToJSONTyped,
|
|
1675
1956
|
FetchError,
|
|
1676
1957
|
GameFromJSON,
|
|
1677
1958
|
GameFromJSONTyped,
|
|
1959
|
+
GameOfficialFromJSON,
|
|
1960
|
+
GameOfficialFromJSONTyped,
|
|
1961
|
+
GameOfficialToJSON,
|
|
1962
|
+
GameOfficialToJSONTyped,
|
|
1678
1963
|
GameStatusCode,
|
|
1679
1964
|
GameStatusCodeFromJSON,
|
|
1680
1965
|
GameStatusCodeFromJSONTyped,
|
|
1681
1966
|
GameStatusCodeToJSON,
|
|
1967
|
+
GameStatusCodeToJSONTyped,
|
|
1682
1968
|
GameStatusFromJSON,
|
|
1683
1969
|
GameStatusFromJSONTyped,
|
|
1684
1970
|
GameStatusToJSON,
|
|
1971
|
+
GameStatusToJSONTyped,
|
|
1685
1972
|
GameTeamFromJSON,
|
|
1686
1973
|
GameTeamFromJSONTyped,
|
|
1687
1974
|
GameTeamToJSON,
|
|
1975
|
+
GameTeamToJSONTyped,
|
|
1688
1976
|
GameTeamsFromJSON,
|
|
1689
1977
|
GameTeamsFromJSONTyped,
|
|
1690
1978
|
GameTeamsToJSON,
|
|
1979
|
+
GameTeamsToJSONTyped,
|
|
1691
1980
|
GameToJSON,
|
|
1981
|
+
GameToJSONTyped,
|
|
1692
1982
|
GameType,
|
|
1693
1983
|
GameTypeFromJSON,
|
|
1694
1984
|
GameTypeFromJSONTyped,
|
|
1695
1985
|
GameTypeToJSON,
|
|
1986
|
+
GameTypeToJSONTyped,
|
|
1696
1987
|
InningFromJSON,
|
|
1697
1988
|
InningFromJSONTyped,
|
|
1698
|
-
InningTeamFromJSON,
|
|
1699
|
-
InningTeamFromJSONTyped,
|
|
1700
|
-
InningTeamToJSON,
|
|
1701
1989
|
InningToJSON,
|
|
1990
|
+
InningToJSONTyped,
|
|
1702
1991
|
JSONApiResponse,
|
|
1703
1992
|
LeagueDatesFromJSON,
|
|
1704
1993
|
LeagueDatesFromJSONTyped,
|
|
1705
1994
|
LeagueDatesToJSON,
|
|
1995
|
+
LeagueDatesToJSONTyped,
|
|
1706
1996
|
LeagueFromJSON,
|
|
1707
1997
|
LeagueFromJSONTyped,
|
|
1708
1998
|
LeagueRecordFromJSON,
|
|
1709
1999
|
LeagueRecordFromJSONTyped,
|
|
1710
2000
|
LeagueRecordToJSON,
|
|
2001
|
+
LeagueRecordToJSONTyped,
|
|
1711
2002
|
LeagueToJSON,
|
|
2003
|
+
LeagueToJSONTyped,
|
|
1712
2004
|
LinescoreFromJSON,
|
|
1713
2005
|
LinescoreFromJSONTyped,
|
|
2006
|
+
LinescoreTeamFromJSON,
|
|
2007
|
+
LinescoreTeamFromJSONTyped,
|
|
2008
|
+
LinescoreTeamToJSON,
|
|
2009
|
+
LinescoreTeamToJSONTyped,
|
|
2010
|
+
LinescoreTeamsFromJSON,
|
|
2011
|
+
LinescoreTeamsFromJSONTyped,
|
|
2012
|
+
LinescoreTeamsToJSON,
|
|
2013
|
+
LinescoreTeamsToJSONTyped,
|
|
1714
2014
|
LinescoreToJSON,
|
|
2015
|
+
LinescoreToJSONTyped,
|
|
1715
2016
|
MlbApi,
|
|
2017
|
+
OfficialFromJSON,
|
|
2018
|
+
OfficialFromJSONTyped,
|
|
2019
|
+
OfficialToJSON,
|
|
2020
|
+
OfficialToJSONTyped,
|
|
2021
|
+
RecordFromJSON,
|
|
2022
|
+
RecordFromJSONTyped,
|
|
2023
|
+
RecordToJSON,
|
|
2024
|
+
RecordToJSONTyped,
|
|
1716
2025
|
RequiredError,
|
|
1717
2026
|
ResponseError,
|
|
1718
2027
|
ScheduleDayFromJSON,
|
|
1719
2028
|
ScheduleDayFromJSONTyped,
|
|
1720
2029
|
ScheduleDayToJSON,
|
|
2030
|
+
ScheduleDayToJSONTyped,
|
|
1721
2031
|
ScheduleFromJSON,
|
|
1722
2032
|
ScheduleFromJSONTyped,
|
|
1723
2033
|
ScheduleToJSON,
|
|
2034
|
+
ScheduleToJSONTyped,
|
|
1724
2035
|
SeasonFromJSON,
|
|
1725
2036
|
SeasonFromJSONTyped,
|
|
1726
2037
|
SeasonToJSON,
|
|
2038
|
+
SeasonToJSONTyped,
|
|
1727
2039
|
SeasonsFromJSON,
|
|
1728
2040
|
SeasonsFromJSONTyped,
|
|
1729
2041
|
SeasonsToJSON,
|
|
2042
|
+
SeasonsToJSONTyped,
|
|
1730
2043
|
SportFromJSON,
|
|
1731
2044
|
SportFromJSONTyped,
|
|
1732
2045
|
SportToJSON,
|
|
2046
|
+
SportToJSONTyped,
|
|
1733
2047
|
StreakFromJSON,
|
|
1734
2048
|
StreakFromJSONTyped,
|
|
1735
2049
|
StreakStreakTypeEnum,
|
|
1736
2050
|
StreakToJSON,
|
|
2051
|
+
StreakToJSONTyped,
|
|
1737
2052
|
TeamFromJSON,
|
|
1738
|
-
TeamFromJSONTyped,
|
|
1739
|
-
TeamRecordFromJSON,
|
|
1740
|
-
TeamRecordFromJSONTyped,
|
|
1741
|
-
TeamRecordToJSON,
|
|
2053
|
+
TeamFromJSONTyped2 as TeamFromJSONTyped,
|
|
1742
2054
|
TeamToJSON,
|
|
2055
|
+
TeamToJSONTyped2 as TeamToJSONTyped,
|
|
1743
2056
|
TeamsFromJSON,
|
|
1744
2057
|
TeamsFromJSONTyped,
|
|
1745
2058
|
TeamsToJSON,
|
|
2059
|
+
TeamsToJSONTyped,
|
|
1746
2060
|
TextApiResponse,
|
|
1747
2061
|
VenueFromJSON,
|
|
1748
2062
|
VenueFromJSONTyped,
|
|
1749
2063
|
VenueToJSON,
|
|
2064
|
+
VenueToJSONTyped,
|
|
1750
2065
|
VoidApiResponse,
|
|
1751
2066
|
canConsumeForm,
|
|
2067
|
+
instanceOfBoxscore,
|
|
2068
|
+
instanceOfBoxscoreTeams,
|
|
1752
2069
|
instanceOfDivision,
|
|
1753
2070
|
instanceOfDivisionStandings,
|
|
1754
2071
|
instanceOfDivisionStandingsList,
|
|
1755
2072
|
instanceOfGame,
|
|
2073
|
+
instanceOfGameOfficial,
|
|
1756
2074
|
instanceOfGameStatus,
|
|
1757
2075
|
instanceOfGameStatusCode,
|
|
1758
2076
|
instanceOfGameTeam,
|
|
1759
2077
|
instanceOfGameTeams,
|
|
1760
2078
|
instanceOfGameType,
|
|
1761
2079
|
instanceOfInning,
|
|
1762
|
-
instanceOfInningTeam,
|
|
1763
2080
|
instanceOfLeague,
|
|
1764
2081
|
instanceOfLeagueDates,
|
|
1765
2082
|
instanceOfLeagueRecord,
|
|
1766
2083
|
instanceOfLinescore,
|
|
2084
|
+
instanceOfLinescoreTeam,
|
|
2085
|
+
instanceOfLinescoreTeams,
|
|
2086
|
+
instanceOfOfficial,
|
|
2087
|
+
instanceOfRecord,
|
|
1767
2088
|
instanceOfSchedule,
|
|
1768
2089
|
instanceOfScheduleDay,
|
|
1769
2090
|
instanceOfSeason,
|
|
@@ -1771,7 +2092,6 @@ export {
|
|
|
1771
2092
|
instanceOfSport,
|
|
1772
2093
|
instanceOfStreak,
|
|
1773
2094
|
instanceOfTeam,
|
|
1774
|
-
instanceOfTeamRecord,
|
|
1775
2095
|
instanceOfTeams,
|
|
1776
2096
|
instanceOfVenue,
|
|
1777
2097
|
mapValues,
|