@bp1222/stats-api 0.5.0 → 0.6.0
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.ts +21 -20
- package/dist/index.js +173 -167
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export declare interface ApiResponse<T> {
|
|
|
7
7
|
* MLB StatAPI
|
|
8
8
|
* An spec API to consume the MLB Stat API
|
|
9
9
|
*
|
|
10
|
-
* The version of the OpenAPI document: 0.
|
|
10
|
+
* The version of the OpenAPI document: 0.6.0
|
|
11
11
|
*
|
|
12
12
|
*
|
|
13
13
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -52,7 +52,7 @@ export declare class BaseAPI {
|
|
|
52
52
|
* MLB StatAPI
|
|
53
53
|
* An spec API to consume the MLB Stat API
|
|
54
54
|
*
|
|
55
|
-
* The version of the OpenAPI document: 0.
|
|
55
|
+
* The version of the OpenAPI document: 0.6.0
|
|
56
56
|
*
|
|
57
57
|
*
|
|
58
58
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -655,7 +655,7 @@ export declare interface FetchParams {
|
|
|
655
655
|
* MLB StatAPI
|
|
656
656
|
* An spec API to consume the MLB Stat API
|
|
657
657
|
*
|
|
658
|
-
* The version of the OpenAPI document: 0.
|
|
658
|
+
* The version of the OpenAPI document: 0.6.0
|
|
659
659
|
*
|
|
660
660
|
*
|
|
661
661
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -1020,7 +1020,7 @@ export declare interface GameStatus {
|
|
|
1020
1020
|
* MLB StatAPI
|
|
1021
1021
|
* An spec API to consume the MLB Stat API
|
|
1022
1022
|
*
|
|
1023
|
-
* The version of the OpenAPI document: 0.
|
|
1023
|
+
* The version of the OpenAPI document: 0.6.0
|
|
1024
1024
|
*
|
|
1025
1025
|
*
|
|
1026
1026
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -1078,7 +1078,7 @@ export declare interface GameTeam {
|
|
|
1078
1078
|
* @type {LeagueRecord}
|
|
1079
1079
|
* @memberof GameTeam
|
|
1080
1080
|
*/
|
|
1081
|
-
leagueRecord
|
|
1081
|
+
leagueRecord: LeagueRecord;
|
|
1082
1082
|
/**
|
|
1083
1083
|
*
|
|
1084
1084
|
* @type {number}
|
|
@@ -1155,7 +1155,7 @@ export declare function GameToJSONTyped(value?: Game | null, ignoreDiscriminator
|
|
|
1155
1155
|
* MLB StatAPI
|
|
1156
1156
|
* An spec API to consume the MLB Stat API
|
|
1157
1157
|
*
|
|
1158
|
-
* The version of the OpenAPI document: 0.
|
|
1158
|
+
* The version of the OpenAPI document: 0.6.0
|
|
1159
1159
|
*
|
|
1160
1160
|
*
|
|
1161
1161
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -1246,6 +1246,7 @@ export declare interface GetTeamsRequest {
|
|
|
1246
1246
|
sportId: number;
|
|
1247
1247
|
season: string;
|
|
1248
1248
|
leagueIds?: Array<number>;
|
|
1249
|
+
teamId?: Array<number>;
|
|
1249
1250
|
fields?: Array<string>;
|
|
1250
1251
|
hydrate?: string;
|
|
1251
1252
|
}
|
|
@@ -1652,7 +1653,7 @@ export declare interface League {
|
|
|
1652
1653
|
* MLB StatAPI
|
|
1653
1654
|
* An spec API to consume the MLB Stat API
|
|
1654
1655
|
*
|
|
1655
|
-
* The version of the OpenAPI document: 0.
|
|
1656
|
+
* The version of the OpenAPI document: 0.6.0
|
|
1656
1657
|
*
|
|
1657
1658
|
*
|
|
1658
1659
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -1743,7 +1744,7 @@ export declare function LeagueFromJSONTyped(json: any, ignoreDiscriminator: bool
|
|
|
1743
1744
|
* MLB StatAPI
|
|
1744
1745
|
* An spec API to consume the MLB Stat API
|
|
1745
1746
|
*
|
|
1746
|
-
* The version of the OpenAPI document: 0.
|
|
1747
|
+
* The version of the OpenAPI document: 0.6.0
|
|
1747
1748
|
*
|
|
1748
1749
|
*
|
|
1749
1750
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -1899,7 +1900,7 @@ export declare function LinescoreFromJSONTyped(json: any, ignoreDiscriminator: b
|
|
|
1899
1900
|
* MLB StatAPI
|
|
1900
1901
|
* An spec API to consume the MLB Stat API
|
|
1901
1902
|
*
|
|
1902
|
-
* The version of the OpenAPI document: 0.
|
|
1903
|
+
* The version of the OpenAPI document: 0.6.0
|
|
1903
1904
|
*
|
|
1904
1905
|
*
|
|
1905
1906
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -2091,7 +2092,7 @@ export declare type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCa
|
|
|
2091
2092
|
* MLB StatAPI
|
|
2092
2093
|
* An spec API to consume the MLB Stat API
|
|
2093
2094
|
*
|
|
2094
|
-
* The version of the OpenAPI document: 0.
|
|
2095
|
+
* The version of the OpenAPI document: 0.6.0
|
|
2095
2096
|
*
|
|
2096
2097
|
*
|
|
2097
2098
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -2136,7 +2137,7 @@ export declare function OfficialToJSONTyped(value?: Official | null, ignoreDiscr
|
|
|
2136
2137
|
* MLB StatAPI
|
|
2137
2138
|
* An spec API to consume the MLB Stat API
|
|
2138
2139
|
*
|
|
2139
|
-
* The version of the OpenAPI document: 0.
|
|
2140
|
+
* The version of the OpenAPI document: 0.6.0
|
|
2140
2141
|
*
|
|
2141
2142
|
*
|
|
2142
2143
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -2543,7 +2544,7 @@ export declare function PlayerFromJSONTyped(json: any, ignoreDiscriminator: bool
|
|
|
2543
2544
|
* MLB StatAPI
|
|
2544
2545
|
* An spec API to consume the MLB Stat API
|
|
2545
2546
|
*
|
|
2546
|
-
* The version of the OpenAPI document: 0.
|
|
2547
|
+
* The version of the OpenAPI document: 0.6.0
|
|
2547
2548
|
*
|
|
2548
2549
|
*
|
|
2549
2550
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -2594,7 +2595,7 @@ export declare function PlayerGameStatusToJSONTyped(value?: PlayerGameStatus | n
|
|
|
2594
2595
|
* MLB StatAPI
|
|
2595
2596
|
* An spec API to consume the MLB Stat API
|
|
2596
2597
|
*
|
|
2597
|
-
* The version of the OpenAPI document: 0.
|
|
2598
|
+
* The version of the OpenAPI document: 0.6.0
|
|
2598
2599
|
*
|
|
2599
2600
|
*
|
|
2600
2601
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -2645,7 +2646,7 @@ export declare function PlayerPersonToJSONTyped(value?: PlayerPerson | null, ign
|
|
|
2645
2646
|
* MLB StatAPI
|
|
2646
2647
|
* An spec API to consume the MLB Stat API
|
|
2647
2648
|
*
|
|
2648
|
-
* The version of the OpenAPI document: 0.
|
|
2649
|
+
* The version of the OpenAPI document: 0.6.0
|
|
2649
2650
|
*
|
|
2650
2651
|
*
|
|
2651
2652
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -2764,7 +2765,7 @@ export declare function PlayerStatsToJSONTyped(value?: PlayerStats | null, ignor
|
|
|
2764
2765
|
* MLB StatAPI
|
|
2765
2766
|
* An spec API to consume the MLB Stat API
|
|
2766
2767
|
*
|
|
2767
|
-
* The version of the OpenAPI document: 0.
|
|
2768
|
+
* The version of the OpenAPI document: 0.6.0
|
|
2768
2769
|
*
|
|
2769
2770
|
*
|
|
2770
2771
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -2807,7 +2808,7 @@ export declare function PlayerToJSONTyped(value?: Player | null, ignoreDiscrimin
|
|
|
2807
2808
|
* MLB StatAPI
|
|
2808
2809
|
* An spec API to consume the MLB Stat API
|
|
2809
2810
|
*
|
|
2810
|
-
* The version of the OpenAPI document: 0.
|
|
2811
|
+
* The version of the OpenAPI document: 0.6.0
|
|
2811
2812
|
*
|
|
2812
2813
|
*
|
|
2813
2814
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -3246,7 +3247,7 @@ export declare function ScheduleToJSONTyped(value?: Schedule | null, ignoreDiscr
|
|
|
3246
3247
|
* MLB StatAPI
|
|
3247
3248
|
* An spec API to consume the MLB Stat API
|
|
3248
3249
|
*
|
|
3249
|
-
* The version of the OpenAPI document: 0.
|
|
3250
|
+
* The version of the OpenAPI document: 0.6.0
|
|
3250
3251
|
*
|
|
3251
3252
|
*
|
|
3252
3253
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -3422,7 +3423,7 @@ export declare function SeasonToJSONTyped(value?: Season | null, ignoreDiscrimin
|
|
|
3422
3423
|
* MLB StatAPI
|
|
3423
3424
|
* An spec API to consume the MLB Stat API
|
|
3424
3425
|
*
|
|
3425
|
-
* The version of the OpenAPI document: 0.
|
|
3426
|
+
* The version of the OpenAPI document: 0.6.0
|
|
3426
3427
|
*
|
|
3427
3428
|
*
|
|
3428
3429
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -3492,7 +3493,7 @@ export declare function SportToJSONTyped(value?: Sport | null, ignoreDiscriminat
|
|
|
3492
3493
|
* MLB StatAPI
|
|
3493
3494
|
* An spec API to consume the MLB Stat API
|
|
3494
3495
|
*
|
|
3495
|
-
* The version of the OpenAPI document: 0.
|
|
3496
|
+
* The version of the OpenAPI document: 0.6.0
|
|
3496
3497
|
*
|
|
3497
3498
|
*
|
|
3498
3499
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -3748,7 +3749,7 @@ export declare class TextApiResponse {
|
|
|
3748
3749
|
* MLB StatAPI
|
|
3749
3750
|
* An spec API to consume the MLB Stat API
|
|
3750
3751
|
*
|
|
3751
|
-
* The version of the OpenAPI document: 0.
|
|
3752
|
+
* The version of the OpenAPI document: 0.6.0
|
|
3752
3753
|
*
|
|
3753
3754
|
*
|
|
3754
3755
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/index.js
CHANGED
|
@@ -58,8 +58,8 @@ const _ = new Z(), y = class y {
|
|
|
58
58
|
try {
|
|
59
59
|
r = await (this.configuration.fetchApi || fetch)(t.url, t.init);
|
|
60
60
|
} catch (a) {
|
|
61
|
-
for (const
|
|
62
|
-
|
|
61
|
+
for (const o of this.middleware)
|
|
62
|
+
o.onError && (r = await o.onError({
|
|
63
63
|
fetch: this.fetchApi,
|
|
64
64
|
url: t.url,
|
|
65
65
|
init: t.init,
|
|
@@ -116,25 +116,25 @@ const _ = new Z(), y = class y {
|
|
|
116
116
|
i.query !== void 0 && Object.keys(i.query).length !== 0 && (t += "?" + this.configuration.queryParamsStringify(i.query));
|
|
117
117
|
const r = Object.assign({}, this.configuration.headers, i.headers);
|
|
118
118
|
Object.keys(r).forEach((E) => r[E] === void 0 ? delete r[E] : {});
|
|
119
|
-
const a = typeof n == "function" ? n : async () => n,
|
|
119
|
+
const a = typeof n == "function" ? n : async () => n, o = {
|
|
120
120
|
method: i.method,
|
|
121
121
|
headers: r,
|
|
122
122
|
body: i.body,
|
|
123
123
|
credentials: this.configuration.credentials
|
|
124
|
-
},
|
|
125
|
-
...
|
|
124
|
+
}, s = {
|
|
125
|
+
...o,
|
|
126
126
|
...await a({
|
|
127
|
-
init:
|
|
127
|
+
init: o,
|
|
128
128
|
context: i
|
|
129
129
|
})
|
|
130
130
|
};
|
|
131
131
|
let m;
|
|
132
|
-
ee(
|
|
133
|
-
const
|
|
134
|
-
...
|
|
132
|
+
ee(s.body) || s.body instanceof URLSearchParams || j(s.body) ? m = s.body : this.isJsonMime(r["Content-Type"]) ? m = JSON.stringify(s.body) : m = s.body;
|
|
133
|
+
const q = {
|
|
134
|
+
...s,
|
|
135
135
|
body: m
|
|
136
136
|
};
|
|
137
|
-
return { url: t, init:
|
|
137
|
+
return { url: t, init: q };
|
|
138
138
|
}
|
|
139
139
|
/**
|
|
140
140
|
* Create a shallow clone of `this` by constructing a new instance
|
|
@@ -167,7 +167,7 @@ class te extends Error {
|
|
|
167
167
|
this.cause = n;
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
|
-
class
|
|
170
|
+
class l extends Error {
|
|
171
171
|
constructor(n, t) {
|
|
172
172
|
super(t);
|
|
173
173
|
u(this, "name", "RequiredError");
|
|
@@ -211,7 +211,7 @@ function Ut(e) {
|
|
|
211
211
|
return !0;
|
|
212
212
|
return !1;
|
|
213
213
|
}
|
|
214
|
-
class
|
|
214
|
+
class d {
|
|
215
215
|
constructor(i, n = (t) => t) {
|
|
216
216
|
this.raw = i, this.transformer = n;
|
|
217
217
|
}
|
|
@@ -285,7 +285,7 @@ function ne(e, i) {
|
|
|
285
285
|
lineOuts: e.lineOuts == null ? void 0 : e.lineOuts
|
|
286
286
|
};
|
|
287
287
|
}
|
|
288
|
-
function
|
|
288
|
+
function P(e) {
|
|
289
289
|
return re(e, !1);
|
|
290
290
|
}
|
|
291
291
|
function re(e, i = !1) {
|
|
@@ -325,7 +325,7 @@ function re(e, i = !1) {
|
|
|
325
325
|
lineOuts: e.lineOuts
|
|
326
326
|
};
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function Kt(e) {
|
|
329
329
|
return !0;
|
|
330
330
|
}
|
|
331
331
|
function ae(e) {
|
|
@@ -348,7 +348,7 @@ function le(e, i = !1) {
|
|
|
348
348
|
link: e.link
|
|
349
349
|
};
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function Yt(e) {
|
|
352
352
|
return !0;
|
|
353
353
|
}
|
|
354
354
|
function de(e) {
|
|
@@ -369,10 +369,10 @@ function fe(e, i = !1) {
|
|
|
369
369
|
officialType: e.officialType
|
|
370
370
|
};
|
|
371
371
|
}
|
|
372
|
-
function
|
|
372
|
+
function qt(e) {
|
|
373
373
|
return !0;
|
|
374
374
|
}
|
|
375
|
-
function
|
|
375
|
+
function k(e) {
|
|
376
376
|
return me(e);
|
|
377
377
|
}
|
|
378
378
|
function me(e, i) {
|
|
@@ -388,7 +388,7 @@ function me(e, i) {
|
|
|
388
388
|
pickoffs: e.pickoffs == null ? void 0 : e.pickoffs
|
|
389
389
|
};
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function I(e) {
|
|
392
392
|
return ge(e, !1);
|
|
393
393
|
}
|
|
394
394
|
function ge(e, i = !1) {
|
|
@@ -407,7 +407,7 @@ function ge(e, i = !1) {
|
|
|
407
407
|
function zt(e) {
|
|
408
408
|
return !0;
|
|
409
409
|
}
|
|
410
|
-
function
|
|
410
|
+
function B(e) {
|
|
411
411
|
return pe(e);
|
|
412
412
|
}
|
|
413
413
|
function pe(e, i) {
|
|
@@ -462,7 +462,7 @@ function pe(e, i) {
|
|
|
462
462
|
lineOuts: e.lineOuts == null ? void 0 : e.lineOuts
|
|
463
463
|
};
|
|
464
464
|
}
|
|
465
|
-
function
|
|
465
|
+
function J(e) {
|
|
466
466
|
return Se(e, !1);
|
|
467
467
|
}
|
|
468
468
|
function Se(e, i = !1) {
|
|
@@ -526,8 +526,8 @@ function he(e) {
|
|
|
526
526
|
function ye(e, i) {
|
|
527
527
|
return e == null ? e : {
|
|
528
528
|
batting: w(e.batting),
|
|
529
|
-
pitching:
|
|
530
|
-
fielding:
|
|
529
|
+
pitching: B(e.pitching),
|
|
530
|
+
fielding: k(e.fielding)
|
|
531
531
|
};
|
|
532
532
|
}
|
|
533
533
|
function Oe(e) {
|
|
@@ -535,9 +535,9 @@ function Oe(e) {
|
|
|
535
535
|
}
|
|
536
536
|
function Te(e, i = !1) {
|
|
537
537
|
return e == null ? e : {
|
|
538
|
-
batting:
|
|
539
|
-
pitching:
|
|
540
|
-
fielding:
|
|
538
|
+
batting: P(e.batting),
|
|
539
|
+
pitching: J(e.pitching),
|
|
540
|
+
fielding: I(e.fielding)
|
|
541
541
|
};
|
|
542
542
|
}
|
|
543
543
|
function Xt(e) {
|
|
@@ -568,10 +568,10 @@ function we(e, i = !1) {
|
|
|
568
568
|
function Zt(e) {
|
|
569
569
|
return !0;
|
|
570
570
|
}
|
|
571
|
-
function
|
|
572
|
-
return
|
|
571
|
+
function Pe(e) {
|
|
572
|
+
return ke(e);
|
|
573
573
|
}
|
|
574
|
-
function
|
|
574
|
+
function ke(e, i) {
|
|
575
575
|
return e == null ? e : {
|
|
576
576
|
code: e.code == null ? void 0 : e.code,
|
|
577
577
|
name: e.name == null ? void 0 : e.name,
|
|
@@ -579,10 +579,10 @@ function Pe(e, i) {
|
|
|
579
579
|
abbreviation: e.abbreviation == null ? void 0 : e.abbreviation
|
|
580
580
|
};
|
|
581
581
|
}
|
|
582
|
-
function
|
|
583
|
-
return
|
|
582
|
+
function Ie(e) {
|
|
583
|
+
return Be(e, !1);
|
|
584
584
|
}
|
|
585
|
-
function
|
|
585
|
+
function Be(e, i = !1) {
|
|
586
586
|
return e == null ? e : {
|
|
587
587
|
code: e.code,
|
|
588
588
|
name: e.name,
|
|
@@ -593,7 +593,7 @@ function Je(e, i = !1) {
|
|
|
593
593
|
function _t(e) {
|
|
594
594
|
return !(!("id" in e) || e.id === void 0 || !("fullName" in e) || e.fullName === void 0 || !("link" in e) || e.link === void 0 || !("boxscoreName" in e) || e.boxscoreName === void 0);
|
|
595
595
|
}
|
|
596
|
-
function
|
|
596
|
+
function Je(e) {
|
|
597
597
|
return Ge(e);
|
|
598
598
|
}
|
|
599
599
|
function Ge(e, i) {
|
|
@@ -670,8 +670,8 @@ function ve(e) {
|
|
|
670
670
|
function Ve(e, i) {
|
|
671
671
|
return e == null ? e : {
|
|
672
672
|
batting: w(e.batting),
|
|
673
|
-
pitching:
|
|
674
|
-
fielding:
|
|
673
|
+
pitching: B(e.pitching),
|
|
674
|
+
fielding: k(e.fielding)
|
|
675
675
|
};
|
|
676
676
|
}
|
|
677
677
|
function $e(e) {
|
|
@@ -679,20 +679,20 @@ function $e(e) {
|
|
|
679
679
|
}
|
|
680
680
|
function Me(e, i = !1) {
|
|
681
681
|
return e == null ? e : {
|
|
682
|
-
batting:
|
|
683
|
-
pitching:
|
|
684
|
-
fielding:
|
|
682
|
+
batting: P(e.batting),
|
|
683
|
+
pitching: J(e.pitching),
|
|
684
|
+
fielding: I(e.fielding)
|
|
685
685
|
};
|
|
686
686
|
}
|
|
687
687
|
function nn(e) {
|
|
688
688
|
return !(!("person" in e) || e.person === void 0 || !("position" in e) || e.position === void 0 || !("stats" in e) || e.stats === void 0 || !("seasonStats" in e) || e.seasonStats === void 0);
|
|
689
689
|
}
|
|
690
|
-
function
|
|
691
|
-
return
|
|
690
|
+
function Ke(e) {
|
|
691
|
+
return Ye(e);
|
|
692
692
|
}
|
|
693
|
-
function
|
|
693
|
+
function Ye(e, i) {
|
|
694
694
|
return e == null ? e : {
|
|
695
|
-
person:
|
|
695
|
+
person: Je(e.person),
|
|
696
696
|
jerseyNumber: e.jerseyNumber == null ? void 0 : e.jerseyNumber,
|
|
697
697
|
position: Le(e.position),
|
|
698
698
|
status: e.status == null ? void 0 : We(e.status),
|
|
@@ -701,13 +701,13 @@ function Ke(e, i) {
|
|
|
701
701
|
stats: ve(e.stats),
|
|
702
702
|
seasonStats: he(e.seasonStats),
|
|
703
703
|
gameStatus: e.gameStatus == null ? void 0 : De(e.gameStatus),
|
|
704
|
-
allPositions: e.allPositions == null ? void 0 : e.allPositions.map(
|
|
704
|
+
allPositions: e.allPositions == null ? void 0 : e.allPositions.map(Pe),
|
|
705
705
|
type: e.type == null ? void 0 : e.type,
|
|
706
706
|
gameScore: e.gameScore == null ? void 0 : e.gameScore,
|
|
707
707
|
hittingGameScore: e.hittingGameScore == null ? void 0 : e.hittingGameScore
|
|
708
708
|
};
|
|
709
709
|
}
|
|
710
|
-
function
|
|
710
|
+
function qe(e) {
|
|
711
711
|
return ze(e, !1);
|
|
712
712
|
}
|
|
713
713
|
function ze(e, i = !1) {
|
|
@@ -721,7 +721,7 @@ function ze(e, i = !1) {
|
|
|
721
721
|
stats: $e(e.stats),
|
|
722
722
|
seasonStats: Oe(e.seasonStats),
|
|
723
723
|
gameStatus: be(e.gameStatus),
|
|
724
|
-
allPositions: e.allPositions == null ? void 0 : e.allPositions.map(
|
|
724
|
+
allPositions: e.allPositions == null ? void 0 : e.allPositions.map(Ie),
|
|
725
725
|
type: e.type,
|
|
726
726
|
gameScore: e.gameScore,
|
|
727
727
|
hittingGameScore: e.hittingGameScore
|
|
@@ -960,7 +960,7 @@ function mi(e, i = !1) {
|
|
|
960
960
|
function cn(e) {
|
|
961
961
|
return !(!("team" in e) || e.team === void 0 || !("season" in e) || e.season === void 0 || !("streak" in e) || e.streak === void 0 || !("divisionRank" in e) || e.divisionRank === void 0 || !("leagueRank" in e) || e.leagueRank === void 0 || !("gamesBack" in e) || e.gamesBack === void 0 || !("leagueRecord" in e) || e.leagueRecord === void 0 || !("wins" in e) || e.wins === void 0 || !("losses" in e) || e.losses === void 0);
|
|
962
962
|
}
|
|
963
|
-
function
|
|
963
|
+
function K(e) {
|
|
964
964
|
return gi(e);
|
|
965
965
|
}
|
|
966
966
|
function gi(e, i) {
|
|
@@ -999,7 +999,7 @@ function gi(e, i) {
|
|
|
999
999
|
winningPercentage: e.winningPercentage == null ? void 0 : e.winningPercentage
|
|
1000
1000
|
};
|
|
1001
1001
|
}
|
|
1002
|
-
function
|
|
1002
|
+
function Y(e) {
|
|
1003
1003
|
return pi(e, !1);
|
|
1004
1004
|
}
|
|
1005
1005
|
function pi(e, i = !1) {
|
|
@@ -1063,7 +1063,7 @@ function Si(e, i) {
|
|
|
1063
1063
|
springLeague: e.springLeague == null ? void 0 : c(e.springLeague),
|
|
1064
1064
|
division: e.division == null ? void 0 : R(e.division),
|
|
1065
1065
|
sport: e.sport == null ? void 0 : G(e.sport),
|
|
1066
|
-
record: e.record == null ? void 0 :
|
|
1066
|
+
record: e.record == null ? void 0 : K(e.record),
|
|
1067
1067
|
shortName: e.shortName == null ? void 0 : e.shortName,
|
|
1068
1068
|
franchiseName: e.franchiseName == null ? void 0 : e.franchiseName,
|
|
1069
1069
|
clubName: e.clubName == null ? void 0 : e.clubName,
|
|
@@ -1092,7 +1092,7 @@ function hi(e, i = !1) {
|
|
|
1092
1092
|
springLeague: f(e.springLeague),
|
|
1093
1093
|
division: L(e.division),
|
|
1094
1094
|
sport: F(e.sport),
|
|
1095
|
-
record:
|
|
1095
|
+
record: Y(e.record),
|
|
1096
1096
|
shortName: e.shortName,
|
|
1097
1097
|
franchiseName: e.franchiseName,
|
|
1098
1098
|
clubName: e.clubName,
|
|
@@ -1108,8 +1108,8 @@ function yi(e) {
|
|
|
1108
1108
|
function Oi(e, i) {
|
|
1109
1109
|
return e == null ? e : {
|
|
1110
1110
|
batting: w(e.batting),
|
|
1111
|
-
pitching:
|
|
1112
|
-
fielding:
|
|
1111
|
+
pitching: B(e.pitching),
|
|
1112
|
+
fielding: k(e.fielding)
|
|
1113
1113
|
};
|
|
1114
1114
|
}
|
|
1115
1115
|
function Ti(e) {
|
|
@@ -1117,9 +1117,9 @@ function Ti(e) {
|
|
|
1117
1117
|
}
|
|
1118
1118
|
function Di(e, i = !1) {
|
|
1119
1119
|
return e == null ? e : {
|
|
1120
|
-
batting:
|
|
1121
|
-
pitching:
|
|
1122
|
-
fielding:
|
|
1120
|
+
batting: P(e.batting),
|
|
1121
|
+
pitching: J(e.pitching),
|
|
1122
|
+
fielding: I(e.fielding)
|
|
1123
1123
|
};
|
|
1124
1124
|
}
|
|
1125
1125
|
function gn(e) {
|
|
@@ -1136,7 +1136,7 @@ function Ni(e, i) {
|
|
|
1136
1136
|
pitchers: e.pitchers,
|
|
1137
1137
|
bullpen: e.bullpen,
|
|
1138
1138
|
bench: e.bench,
|
|
1139
|
-
players: V(e.players,
|
|
1139
|
+
players: V(e.players, Ke)
|
|
1140
1140
|
};
|
|
1141
1141
|
}
|
|
1142
1142
|
function A(e) {
|
|
@@ -1150,25 +1150,25 @@ function bi(e, i = !1) {
|
|
|
1150
1150
|
pitchers: e.pitchers,
|
|
1151
1151
|
bullpen: e.bullpen,
|
|
1152
1152
|
bench: e.bench,
|
|
1153
|
-
players: V(e.players,
|
|
1153
|
+
players: V(e.players, qe)
|
|
1154
1154
|
};
|
|
1155
1155
|
}
|
|
1156
1156
|
function pn(e) {
|
|
1157
1157
|
return !(!("away" in e) || e.away === void 0 || !("home" in e) || e.home === void 0);
|
|
1158
1158
|
}
|
|
1159
1159
|
function wi(e) {
|
|
1160
|
-
return
|
|
1160
|
+
return Pi(e);
|
|
1161
1161
|
}
|
|
1162
|
-
function
|
|
1162
|
+
function Pi(e, i) {
|
|
1163
1163
|
return e == null ? e : {
|
|
1164
1164
|
away: C(e.away),
|
|
1165
1165
|
home: C(e.home)
|
|
1166
1166
|
};
|
|
1167
1167
|
}
|
|
1168
|
-
function
|
|
1169
|
-
return
|
|
1168
|
+
function ki(e) {
|
|
1169
|
+
return Ii(e, !1);
|
|
1170
1170
|
}
|
|
1171
|
-
function
|
|
1171
|
+
function Ii(e, i = !1) {
|
|
1172
1172
|
return e == null ? e : {
|
|
1173
1173
|
away: A(e.away),
|
|
1174
1174
|
home: A(e.home)
|
|
@@ -1177,10 +1177,10 @@ function Bi(e, i = !1) {
|
|
|
1177
1177
|
function Sn(e) {
|
|
1178
1178
|
return !(!("teams" in e) || e.teams === void 0 || !("officials" in e) || e.officials === void 0);
|
|
1179
1179
|
}
|
|
1180
|
-
function
|
|
1181
|
-
return
|
|
1180
|
+
function Bi(e) {
|
|
1181
|
+
return Ji(e);
|
|
1182
1182
|
}
|
|
1183
|
-
function
|
|
1183
|
+
function Ji(e, i) {
|
|
1184
1184
|
return e == null ? e : {
|
|
1185
1185
|
teams: wi(e.teams),
|
|
1186
1186
|
officials: e.officials.map(de)
|
|
@@ -1191,7 +1191,7 @@ function hn(e) {
|
|
|
1191
1191
|
}
|
|
1192
1192
|
function Gi(e, i = !1) {
|
|
1193
1193
|
return e == null ? e : {
|
|
1194
|
-
teams:
|
|
1194
|
+
teams: ki(e.teams),
|
|
1195
1195
|
officials: e.officials.map(ce)
|
|
1196
1196
|
};
|
|
1197
1197
|
}
|
|
@@ -1208,7 +1208,7 @@ function Ri(e, i) {
|
|
|
1208
1208
|
division: R(e.division),
|
|
1209
1209
|
sport: G(e.sport),
|
|
1210
1210
|
lastUpdated: e.lastUpdated == null ? void 0 : e.lastUpdated,
|
|
1211
|
-
teamRecords: e.teamRecords.map(
|
|
1211
|
+
teamRecords: e.teamRecords.map(K)
|
|
1212
1212
|
};
|
|
1213
1213
|
}
|
|
1214
1214
|
function Li(e) {
|
|
@@ -1221,7 +1221,7 @@ function Ei(e, i = !1) {
|
|
|
1221
1221
|
division: L(e.division),
|
|
1222
1222
|
sport: F(e.sport),
|
|
1223
1223
|
lastUpdated: e.lastUpdated,
|
|
1224
|
-
teamRecords: e.teamRecords.map(
|
|
1224
|
+
teamRecords: e.teamRecords.map(Y)
|
|
1225
1225
|
};
|
|
1226
1226
|
}
|
|
1227
1227
|
function On(e) {
|
|
@@ -1278,10 +1278,10 @@ function Vi(e, i) {
|
|
|
1278
1278
|
function wn(e) {
|
|
1279
1279
|
return e;
|
|
1280
1280
|
}
|
|
1281
|
-
function
|
|
1281
|
+
function Pn(e, i) {
|
|
1282
1282
|
return e;
|
|
1283
1283
|
}
|
|
1284
|
-
function
|
|
1284
|
+
function kn(e) {
|
|
1285
1285
|
return !0;
|
|
1286
1286
|
}
|
|
1287
1287
|
function $i(e) {
|
|
@@ -1297,10 +1297,10 @@ function Mi(e, i) {
|
|
|
1297
1297
|
abstractGameCode: e.abstractGameCode == null ? void 0 : e.abstractGameCode
|
|
1298
1298
|
};
|
|
1299
1299
|
}
|
|
1300
|
-
function
|
|
1301
|
-
return
|
|
1300
|
+
function Ki(e) {
|
|
1301
|
+
return Yi(e, !1);
|
|
1302
1302
|
}
|
|
1303
|
-
function
|
|
1303
|
+
function Yi(e, i = !1) {
|
|
1304
1304
|
return e == null ? e : {
|
|
1305
1305
|
abstractGameState: e.abstractGameState,
|
|
1306
1306
|
codedGameState: e.codedGameState,
|
|
@@ -1310,15 +1310,15 @@ function Ki(e, i = !1) {
|
|
|
1310
1310
|
abstractGameCode: e.abstractGameCode
|
|
1311
1311
|
};
|
|
1312
1312
|
}
|
|
1313
|
-
function
|
|
1314
|
-
return !(!("score" in e) || e.score === void 0 || !("team" in e) || e.team === void 0 || !("isWinner" in e) || e.isWinner === void 0);
|
|
1313
|
+
function In(e) {
|
|
1314
|
+
return !(!("leagueRecord" in e) || e.leagueRecord === void 0 || !("score" in e) || e.score === void 0 || !("team" in e) || e.team === void 0 || !("isWinner" in e) || e.isWinner === void 0);
|
|
1315
1315
|
}
|
|
1316
1316
|
function W(e) {
|
|
1317
|
-
return
|
|
1317
|
+
return qi(e);
|
|
1318
1318
|
}
|
|
1319
|
-
function
|
|
1319
|
+
function qi(e, i) {
|
|
1320
1320
|
return e == null ? e : {
|
|
1321
|
-
leagueRecord:
|
|
1321
|
+
leagueRecord: $(e.leagueRecord),
|
|
1322
1322
|
score: e.score,
|
|
1323
1323
|
team: O(e.team),
|
|
1324
1324
|
isWinner: e.isWinner,
|
|
@@ -1339,7 +1339,7 @@ function zi(e, i = !1) {
|
|
|
1339
1339
|
seriesNumber: e.seriesNumber
|
|
1340
1340
|
};
|
|
1341
1341
|
}
|
|
1342
|
-
function
|
|
1342
|
+
function Bn(e) {
|
|
1343
1343
|
return !(!("away" in e) || e.away === void 0 || !("home" in e) || e.home === void 0);
|
|
1344
1344
|
}
|
|
1345
1345
|
function Qi(e) {
|
|
@@ -1361,7 +1361,7 @@ function _i(e, i = !1) {
|
|
|
1361
1361
|
};
|
|
1362
1362
|
}
|
|
1363
1363
|
var p = /* @__PURE__ */ ((e) => (e.Exhibition = "E", e.SpringTraining = "S", e.Regular = "R", e.WildCardSeries = "F", e.DivisionSeries = "D", e.LeagueChampionshipSeries = "L", e.WorldSeries = "W", e))(p || {});
|
|
1364
|
-
function
|
|
1364
|
+
function Jn(e) {
|
|
1365
1365
|
for (const i in p)
|
|
1366
1366
|
if (Object.prototype.hasOwnProperty.call(p, i) && p[i] === e)
|
|
1367
1367
|
return !0;
|
|
@@ -1438,7 +1438,7 @@ function rt(e, i = !1) {
|
|
|
1438
1438
|
rescheduledToDate: e.rescheduledToDate,
|
|
1439
1439
|
rescheduledFrom: e.rescheduledFrom,
|
|
1440
1440
|
rescheduledFromDate: e.rescheduledFromDate,
|
|
1441
|
-
status:
|
|
1441
|
+
status: Ki(e.status),
|
|
1442
1442
|
teams: Zi(e.teams),
|
|
1443
1443
|
venue: b(e.venue),
|
|
1444
1444
|
isTie: e.isTie,
|
|
@@ -1623,10 +1623,10 @@ function wt(e, i = !1) {
|
|
|
1623
1623
|
function vn(e) {
|
|
1624
1624
|
return !(!("totalItems" in e) || e.totalItems === void 0 || !("totalEvents" in e) || e.totalEvents === void 0 || !("totalGames" in e) || e.totalGames === void 0 || !("totalGamesInProgress" in e) || e.totalGamesInProgress === void 0 || !("dates" in e) || e.dates === void 0);
|
|
1625
1625
|
}
|
|
1626
|
-
function
|
|
1627
|
-
return
|
|
1626
|
+
function Pt(e) {
|
|
1627
|
+
return kt(e);
|
|
1628
1628
|
}
|
|
1629
|
-
function
|
|
1629
|
+
function kt(e, i) {
|
|
1630
1630
|
return e == null ? e : {
|
|
1631
1631
|
totalItems: e.totalItems,
|
|
1632
1632
|
totalEvents: e.totalEvents,
|
|
@@ -1636,9 +1636,9 @@ function Pt(e, i) {
|
|
|
1636
1636
|
};
|
|
1637
1637
|
}
|
|
1638
1638
|
function Vn(e) {
|
|
1639
|
-
return
|
|
1639
|
+
return It(e, !1);
|
|
1640
1640
|
}
|
|
1641
|
-
function
|
|
1641
|
+
function It(e, i = !1) {
|
|
1642
1642
|
return e == null ? e : {
|
|
1643
1643
|
totalItems: e.totalItems,
|
|
1644
1644
|
totalEvents: e.totalEvents,
|
|
@@ -1650,10 +1650,10 @@ function Bt(e, i = !1) {
|
|
|
1650
1650
|
function $n(e) {
|
|
1651
1651
|
return !(!("seasonId" in e) || e.seasonId === void 0 || !("seasonStartDate" in e) || e.seasonStartDate === void 0 || !("seasonEndDate" in e) || e.seasonEndDate === void 0 || !("regularSeasonStartDate" in e) || e.regularSeasonStartDate === void 0 || !("regularSeasonEndDate" in e) || e.regularSeasonEndDate === void 0);
|
|
1652
1652
|
}
|
|
1653
|
-
function
|
|
1654
|
-
return
|
|
1653
|
+
function Bt(e) {
|
|
1654
|
+
return Jt(e);
|
|
1655
1655
|
}
|
|
1656
|
-
function
|
|
1656
|
+
function Jt(e, i) {
|
|
1657
1657
|
return e == null ? e : {
|
|
1658
1658
|
seasonId: e.seasonId,
|
|
1659
1659
|
hasWildcard: e.hasWildcard == null ? void 0 : e.hasWildcard,
|
|
@@ -1714,10 +1714,10 @@ function H(e) {
|
|
|
1714
1714
|
}
|
|
1715
1715
|
function Rt(e, i) {
|
|
1716
1716
|
return e == null ? e : {
|
|
1717
|
-
seasons: e.seasons.map(
|
|
1717
|
+
seasons: e.seasons.map(Bt)
|
|
1718
1718
|
};
|
|
1719
1719
|
}
|
|
1720
|
-
function
|
|
1720
|
+
function Kn(e) {
|
|
1721
1721
|
return Lt(e, !1);
|
|
1722
1722
|
}
|
|
1723
1723
|
function Lt(e, i = !1) {
|
|
@@ -1725,7 +1725,7 @@ function Lt(e, i = !1) {
|
|
|
1725
1725
|
seasons: e.seasons.map(Gt)
|
|
1726
1726
|
};
|
|
1727
1727
|
}
|
|
1728
|
-
function
|
|
1728
|
+
function Yn(e) {
|
|
1729
1729
|
return !(!("teams" in e) || e.teams === void 0);
|
|
1730
1730
|
}
|
|
1731
1731
|
function Et(e) {
|
|
@@ -1736,7 +1736,7 @@ function Ct(e, i) {
|
|
|
1736
1736
|
teams: e.teams.map(O)
|
|
1737
1737
|
};
|
|
1738
1738
|
}
|
|
1739
|
-
function
|
|
1739
|
+
function qn(e) {
|
|
1740
1740
|
return At(e, !1);
|
|
1741
1741
|
}
|
|
1742
1742
|
function At(e, i = !1) {
|
|
@@ -1751,19 +1751,19 @@ class zn extends D {
|
|
|
1751
1751
|
*/
|
|
1752
1752
|
async getAllSeasonsRaw(i, n) {
|
|
1753
1753
|
if (i.sportId == null)
|
|
1754
|
-
throw new
|
|
1754
|
+
throw new l(
|
|
1755
1755
|
"sportId",
|
|
1756
1756
|
'Required parameter "sportId" was null or undefined when calling getAllSeasons().'
|
|
1757
1757
|
);
|
|
1758
1758
|
const t = {};
|
|
1759
1759
|
i.sportId != null && (t.sportId = i.sportId);
|
|
1760
|
-
const r = {},
|
|
1760
|
+
const r = {}, o = await this.request({
|
|
1761
1761
|
path: "/v1/seasons/all",
|
|
1762
1762
|
method: "GET",
|
|
1763
1763
|
headers: r,
|
|
1764
1764
|
query: t
|
|
1765
1765
|
}, n);
|
|
1766
|
-
return new
|
|
1766
|
+
return new d(o, (s) => H(s));
|
|
1767
1767
|
}
|
|
1768
1768
|
/**
|
|
1769
1769
|
* Returns All Seasons
|
|
@@ -1778,19 +1778,22 @@ class zn extends D {
|
|
|
1778
1778
|
*/
|
|
1779
1779
|
async getBoxscoreRaw(i, n) {
|
|
1780
1780
|
if (i.gamePk == null)
|
|
1781
|
-
throw new
|
|
1781
|
+
throw new l(
|
|
1782
1782
|
"gamePk",
|
|
1783
1783
|
'Required parameter "gamePk" was null or undefined when calling getBoxscore().'
|
|
1784
1784
|
);
|
|
1785
1785
|
const t = {};
|
|
1786
1786
|
i.fields != null && (t.fields = i.fields);
|
|
1787
|
-
const r = {}
|
|
1788
|
-
|
|
1787
|
+
const r = {};
|
|
1788
|
+
let a = "/v1/game/{gamePk}/boxscore";
|
|
1789
|
+
a = a.replace("{gamePk}", encodeURIComponent(String(i.gamePk)));
|
|
1790
|
+
const o = await this.request({
|
|
1791
|
+
path: a,
|
|
1789
1792
|
method: "GET",
|
|
1790
1793
|
headers: r,
|
|
1791
1794
|
query: t
|
|
1792
1795
|
}, n);
|
|
1793
|
-
return new
|
|
1796
|
+
return new d(o, (s) => Bi(s));
|
|
1794
1797
|
}
|
|
1795
1798
|
/**
|
|
1796
1799
|
* Returns Boxscore
|
|
@@ -1805,24 +1808,24 @@ class zn extends D {
|
|
|
1805
1808
|
*/
|
|
1806
1809
|
async getDivisionsRaw(i, n) {
|
|
1807
1810
|
if (i.sportId == null)
|
|
1808
|
-
throw new
|
|
1811
|
+
throw new l(
|
|
1809
1812
|
"sportId",
|
|
1810
1813
|
'Required parameter "sportId" was null or undefined when calling getDivisions().'
|
|
1811
1814
|
);
|
|
1812
1815
|
if (i.season == null)
|
|
1813
|
-
throw new
|
|
1816
|
+
throw new l(
|
|
1814
1817
|
"season",
|
|
1815
1818
|
'Required parameter "season" was null or undefined when calling getDivisions().'
|
|
1816
1819
|
);
|
|
1817
1820
|
const t = {};
|
|
1818
1821
|
i.sportId != null && (t.sportId = i.sportId), i.season != null && (t.season = i.season);
|
|
1819
|
-
const r = {},
|
|
1822
|
+
const r = {}, o = await this.request({
|
|
1820
1823
|
path: "/v1/divisions",
|
|
1821
1824
|
method: "GET",
|
|
1822
1825
|
headers: r,
|
|
1823
1826
|
query: t
|
|
1824
1827
|
}, n);
|
|
1825
|
-
return new
|
|
1828
|
+
return new d(o, (s) => xi(s));
|
|
1826
1829
|
}
|
|
1827
1830
|
/**
|
|
1828
1831
|
* Returns Divisions
|
|
@@ -1837,24 +1840,24 @@ class zn extends D {
|
|
|
1837
1840
|
*/
|
|
1838
1841
|
async getLeaguesRaw(i, n) {
|
|
1839
1842
|
if (i.sportId == null)
|
|
1840
|
-
throw new
|
|
1843
|
+
throw new l(
|
|
1841
1844
|
"sportId",
|
|
1842
1845
|
'Required parameter "sportId" was null or undefined when calling getLeagues().'
|
|
1843
1846
|
);
|
|
1844
1847
|
if (i.season == null)
|
|
1845
|
-
throw new
|
|
1848
|
+
throw new l(
|
|
1846
1849
|
"season",
|
|
1847
1850
|
'Required parameter "season" was null or undefined when calling getLeagues().'
|
|
1848
1851
|
);
|
|
1849
1852
|
const t = {};
|
|
1850
1853
|
i.sportId != null && (t.sportId = i.sportId), i.season != null && (t.season = i.season);
|
|
1851
|
-
const r = {},
|
|
1854
|
+
const r = {}, o = await this.request({
|
|
1852
1855
|
path: "/v1/leagues",
|
|
1853
1856
|
method: "GET",
|
|
1854
1857
|
headers: r,
|
|
1855
1858
|
query: t
|
|
1856
1859
|
}, n);
|
|
1857
|
-
return new
|
|
1860
|
+
return new d(o, (s) => ct(s));
|
|
1858
1861
|
}
|
|
1859
1862
|
/**
|
|
1860
1863
|
* Returns Leagues
|
|
@@ -1869,19 +1872,22 @@ class zn extends D {
|
|
|
1869
1872
|
*/
|
|
1870
1873
|
async getLinescoreRaw(i, n) {
|
|
1871
1874
|
if (i.gamePk == null)
|
|
1872
|
-
throw new
|
|
1875
|
+
throw new l(
|
|
1873
1876
|
"gamePk",
|
|
1874
1877
|
'Required parameter "gamePk" was null or undefined when calling getLinescore().'
|
|
1875
1878
|
);
|
|
1876
1879
|
const t = {};
|
|
1877
1880
|
i.fields != null && (t.fields = i.fields);
|
|
1878
|
-
const r = {}
|
|
1879
|
-
|
|
1881
|
+
const r = {};
|
|
1882
|
+
let a = "/v1/game/{gamePk}/linescore";
|
|
1883
|
+
a = a.replace("{gamePk}", encodeURIComponent(String(i.gamePk)));
|
|
1884
|
+
const o = await this.request({
|
|
1885
|
+
path: a,
|
|
1880
1886
|
method: "GET",
|
|
1881
1887
|
headers: r,
|
|
1882
1888
|
query: t
|
|
1883
1889
|
}, n);
|
|
1884
|
-
return new
|
|
1890
|
+
return new d(o, (s) => yt(s));
|
|
1885
1891
|
}
|
|
1886
1892
|
/**
|
|
1887
1893
|
* Returns Linescore
|
|
@@ -1896,19 +1902,19 @@ class zn extends D {
|
|
|
1896
1902
|
*/
|
|
1897
1903
|
async getScheduleRaw(i, n) {
|
|
1898
1904
|
if (i.sportId == null)
|
|
1899
|
-
throw new
|
|
1905
|
+
throw new l(
|
|
1900
1906
|
"sportId",
|
|
1901
1907
|
'Required parameter "sportId" was null or undefined when calling getSchedule().'
|
|
1902
1908
|
);
|
|
1903
1909
|
const t = {};
|
|
1904
1910
|
i.gamePk != null && (t.gamePk = i.gamePk), i.sportId != null && (t.sportId = i.sportId), i.gameTypes != null && (t.gameTypes = i.gameTypes), i.startDate != null && (t.startDate = i.startDate), i.endDate != null && (t.endDate = i.endDate), i.fields != null && (t.fields = i.fields), i.hydrate != null && (t.hydrate = i.hydrate), i.leagueIds != null && (t.leagueIds = i.leagueIds), i.teamId != null && (t.teamId = i.teamId);
|
|
1905
|
-
const r = {},
|
|
1911
|
+
const r = {}, o = await this.request({
|
|
1906
1912
|
path: "/v1/schedule",
|
|
1907
1913
|
method: "GET",
|
|
1908
1914
|
headers: r,
|
|
1909
1915
|
query: t
|
|
1910
1916
|
}, n);
|
|
1911
|
-
return new
|
|
1917
|
+
return new d(o, (s) => Pt(s));
|
|
1912
1918
|
}
|
|
1913
1919
|
/**
|
|
1914
1920
|
* Returns Schedule
|
|
@@ -1923,24 +1929,24 @@ class zn extends D {
|
|
|
1923
1929
|
*/
|
|
1924
1930
|
async getSeasonRaw(i, n) {
|
|
1925
1931
|
if (i.sportId == null)
|
|
1926
|
-
throw new
|
|
1932
|
+
throw new l(
|
|
1927
1933
|
"sportId",
|
|
1928
1934
|
'Required parameter "sportId" was null or undefined when calling getSeason().'
|
|
1929
1935
|
);
|
|
1930
1936
|
if (i.season == null)
|
|
1931
|
-
throw new
|
|
1937
|
+
throw new l(
|
|
1932
1938
|
"season",
|
|
1933
1939
|
'Required parameter "season" was null or undefined when calling getSeason().'
|
|
1934
1940
|
);
|
|
1935
1941
|
const t = {};
|
|
1936
1942
|
i.sportId != null && (t.sportId = i.sportId), i.season != null && (t.season = i.season);
|
|
1937
|
-
const r = {},
|
|
1943
|
+
const r = {}, o = await this.request({
|
|
1938
1944
|
path: "/v1/seasons",
|
|
1939
1945
|
method: "GET",
|
|
1940
1946
|
headers: r,
|
|
1941
1947
|
query: t
|
|
1942
1948
|
}, n);
|
|
1943
|
-
return new
|
|
1949
|
+
return new d(o, (s) => H(s));
|
|
1944
1950
|
}
|
|
1945
1951
|
/**
|
|
1946
1952
|
* Returns Season
|
|
@@ -1955,24 +1961,24 @@ class zn extends D {
|
|
|
1955
1961
|
*/
|
|
1956
1962
|
async getStandingsRaw(i, n) {
|
|
1957
1963
|
if (i.leagueId == null)
|
|
1958
|
-
throw new
|
|
1964
|
+
throw new l(
|
|
1959
1965
|
"leagueId",
|
|
1960
1966
|
'Required parameter "leagueId" was null or undefined when calling getStandings().'
|
|
1961
1967
|
);
|
|
1962
1968
|
if (i.season == null)
|
|
1963
|
-
throw new
|
|
1969
|
+
throw new l(
|
|
1964
1970
|
"season",
|
|
1965
1971
|
'Required parameter "season" was null or undefined when calling getStandings().'
|
|
1966
1972
|
);
|
|
1967
1973
|
const t = {};
|
|
1968
1974
|
i.leagueId != null && (t.leagueId = i.leagueId), i.season != null && (t.season = i.season), i.date != null && (t.date = i.date), i.fields != null && (t.fields = i.fields), i.hydrate != null && (t.hydrate = i.hydrate);
|
|
1969
|
-
const r = {},
|
|
1975
|
+
const r = {}, o = await this.request({
|
|
1970
1976
|
path: "/v1/standings",
|
|
1971
1977
|
method: "GET",
|
|
1972
1978
|
headers: r,
|
|
1973
1979
|
query: t
|
|
1974
1980
|
}, n);
|
|
1975
|
-
return new
|
|
1981
|
+
return new d(o, (s) => Ci(s));
|
|
1976
1982
|
}
|
|
1977
1983
|
/**
|
|
1978
1984
|
* Returns Standing
|
|
@@ -1987,24 +1993,24 @@ class zn extends D {
|
|
|
1987
1993
|
*/
|
|
1988
1994
|
async getTeamsRaw(i, n) {
|
|
1989
1995
|
if (i.sportId == null)
|
|
1990
|
-
throw new
|
|
1996
|
+
throw new l(
|
|
1991
1997
|
"sportId",
|
|
1992
1998
|
'Required parameter "sportId" was null or undefined when calling getTeams().'
|
|
1993
1999
|
);
|
|
1994
2000
|
if (i.season == null)
|
|
1995
|
-
throw new
|
|
2001
|
+
throw new l(
|
|
1996
2002
|
"season",
|
|
1997
2003
|
'Required parameter "season" was null or undefined when calling getTeams().'
|
|
1998
2004
|
);
|
|
1999
2005
|
const t = {};
|
|
2000
|
-
i.sportId != null && (t.sportId = i.sportId), i.season != null && (t.season = i.season), i.leagueIds != null && (t.leagueIds = i.leagueIds), i.fields != null && (t.fields = i.fields), i.hydrate != null && (t.hydrate = i.hydrate);
|
|
2001
|
-
const r = {},
|
|
2006
|
+
i.sportId != null && (t.sportId = i.sportId), i.season != null && (t.season = i.season), i.leagueIds != null && (t.leagueIds = i.leagueIds), i.teamId != null && (t.teamId = i.teamId), i.fields != null && (t.fields = i.fields), i.hydrate != null && (t.hydrate = i.hydrate);
|
|
2007
|
+
const r = {}, o = await this.request({
|
|
2002
2008
|
path: "/v1/teams",
|
|
2003
2009
|
method: "GET",
|
|
2004
2010
|
headers: r,
|
|
2005
2011
|
query: t
|
|
2006
2012
|
}, n);
|
|
2007
|
-
return new
|
|
2013
|
+
return new d(o, (s) => Et(s));
|
|
2008
2014
|
}
|
|
2009
2015
|
/**
|
|
2010
2016
|
* Returns Teams
|
|
@@ -2019,19 +2025,19 @@ export {
|
|
|
2019
2025
|
D as BaseAPI,
|
|
2020
2026
|
w as BattingStatsFromJSON,
|
|
2021
2027
|
ne as BattingStatsFromJSONTyped,
|
|
2022
|
-
|
|
2028
|
+
P as BattingStatsToJSON,
|
|
2023
2029
|
re as BattingStatsToJSONTyped,
|
|
2024
2030
|
Vt as BlobApiResponse,
|
|
2025
|
-
|
|
2026
|
-
|
|
2031
|
+
Bi as BoxscoreFromJSON,
|
|
2032
|
+
Ji as BoxscoreFromJSONTyped,
|
|
2027
2033
|
C as BoxscoreTeamFromJSON,
|
|
2028
2034
|
Ni as BoxscoreTeamFromJSONTyped,
|
|
2029
2035
|
A as BoxscoreTeamToJSON,
|
|
2030
2036
|
bi as BoxscoreTeamToJSONTyped,
|
|
2031
2037
|
wi as BoxscoreTeamsFromJSON,
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2038
|
+
Pi as BoxscoreTeamsFromJSONTyped,
|
|
2039
|
+
ki as BoxscoreTeamsToJSON,
|
|
2040
|
+
Ii as BoxscoreTeamsToJSONTyped,
|
|
2035
2041
|
hn as BoxscoreToJSON,
|
|
2036
2042
|
Gi as BoxscoreToJSONTyped,
|
|
2037
2043
|
xt as COLLECTION_FORMATS,
|
|
@@ -2054,9 +2060,9 @@ export {
|
|
|
2054
2060
|
Nn as DivisionsToJSON,
|
|
2055
2061
|
Ui as DivisionsToJSONTyped,
|
|
2056
2062
|
te as FetchError,
|
|
2057
|
-
|
|
2063
|
+
k as FieldingStatsFromJSON,
|
|
2058
2064
|
me as FieldingStatsFromJSONTyped,
|
|
2059
|
-
|
|
2065
|
+
I as FieldingStatsToJSON,
|
|
2060
2066
|
ge as FieldingStatsToJSONTyped,
|
|
2061
2067
|
it as GameFromJSON,
|
|
2062
2068
|
tt as GameFromJSONTyped,
|
|
@@ -2068,13 +2074,13 @@ export {
|
|
|
2068
2074
|
vi as GameStatusCodeFromJSON,
|
|
2069
2075
|
Vi as GameStatusCodeFromJSONTyped,
|
|
2070
2076
|
wn as GameStatusCodeToJSON,
|
|
2071
|
-
|
|
2077
|
+
Pn as GameStatusCodeToJSONTyped,
|
|
2072
2078
|
$i as GameStatusFromJSON,
|
|
2073
2079
|
Mi as GameStatusFromJSONTyped,
|
|
2074
|
-
|
|
2075
|
-
|
|
2080
|
+
Ki as GameStatusToJSON,
|
|
2081
|
+
Yi as GameStatusToJSONTyped,
|
|
2076
2082
|
W as GameTeamFromJSON,
|
|
2077
|
-
|
|
2083
|
+
qi as GameTeamFromJSONTyped,
|
|
2078
2084
|
x as GameTeamToJSON,
|
|
2079
2085
|
zi as GameTeamToJSONTyped,
|
|
2080
2086
|
Qi as GameTeamsFromJSON,
|
|
@@ -2092,7 +2098,7 @@ export {
|
|
|
2092
2098
|
lt as InningFromJSONTyped,
|
|
2093
2099
|
dt as InningToJSON,
|
|
2094
2100
|
ut as InningToJSONTyped,
|
|
2095
|
-
|
|
2101
|
+
d as JSONApiResponse,
|
|
2096
2102
|
Qe as LeagueDatesFromJSON,
|
|
2097
2103
|
Xe as LeagueDatesFromJSONTyped,
|
|
2098
2104
|
Ze as LeagueDatesToJSON,
|
|
@@ -2126,17 +2132,17 @@ export {
|
|
|
2126
2132
|
se as OfficialFromJSONTyped,
|
|
2127
2133
|
oe as OfficialToJSON,
|
|
2128
2134
|
le as OfficialToJSONTyped,
|
|
2129
|
-
|
|
2135
|
+
B as PitchingStatsFromJSON,
|
|
2130
2136
|
pe as PitchingStatsFromJSONTyped,
|
|
2131
|
-
|
|
2137
|
+
J as PitchingStatsToJSON,
|
|
2132
2138
|
Se as PitchingStatsToJSONTyped,
|
|
2133
|
-
|
|
2134
|
-
|
|
2139
|
+
Ke as PlayerFromJSON,
|
|
2140
|
+
Ye as PlayerFromJSONTyped,
|
|
2135
2141
|
De as PlayerGameStatusFromJSON,
|
|
2136
2142
|
Ne as PlayerGameStatusFromJSONTyped,
|
|
2137
2143
|
be as PlayerGameStatusToJSON,
|
|
2138
2144
|
we as PlayerGameStatusToJSONTyped,
|
|
2139
|
-
|
|
2145
|
+
Je as PlayerPersonFromJSON,
|
|
2140
2146
|
Ge as PlayerPersonFromJSONTyped,
|
|
2141
2147
|
Fe as PlayerPersonToJSON,
|
|
2142
2148
|
Re as PlayerPersonToJSONTyped,
|
|
@@ -2156,33 +2162,33 @@ export {
|
|
|
2156
2162
|
xe as PlayerStatusFromJSONTyped,
|
|
2157
2163
|
He as PlayerStatusToJSON,
|
|
2158
2164
|
Ue as PlayerStatusToJSONTyped,
|
|
2159
|
-
|
|
2165
|
+
qe as PlayerToJSON,
|
|
2160
2166
|
ze as PlayerToJSONTyped,
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2167
|
+
Pe as PositionFromJSON,
|
|
2168
|
+
ke as PositionFromJSONTyped,
|
|
2169
|
+
Ie as PositionToJSON,
|
|
2170
|
+
Be as PositionToJSONTyped,
|
|
2171
|
+
K as RecordFromJSON,
|
|
2166
2172
|
gi as RecordFromJSONTyped,
|
|
2167
|
-
|
|
2173
|
+
Y as RecordToJSON,
|
|
2168
2174
|
pi as RecordToJSONTyped,
|
|
2169
|
-
|
|
2175
|
+
l as RequiredError,
|
|
2170
2176
|
ie as ResponseError,
|
|
2171
2177
|
Dt as ScheduleDayFromJSON,
|
|
2172
2178
|
Nt as ScheduleDayFromJSONTyped,
|
|
2173
2179
|
bt as ScheduleDayToJSON,
|
|
2174
2180
|
wt as ScheduleDayToJSONTyped,
|
|
2175
|
-
|
|
2176
|
-
|
|
2181
|
+
Pt as ScheduleFromJSON,
|
|
2182
|
+
kt as ScheduleFromJSONTyped,
|
|
2177
2183
|
Vn as ScheduleToJSON,
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2184
|
+
It as ScheduleToJSONTyped,
|
|
2185
|
+
Bt as SeasonFromJSON,
|
|
2186
|
+
Jt as SeasonFromJSONTyped,
|
|
2181
2187
|
Gt as SeasonToJSON,
|
|
2182
2188
|
Ft as SeasonToJSONTyped,
|
|
2183
2189
|
H as SeasonsFromJSON,
|
|
2184
2190
|
Rt as SeasonsFromJSONTyped,
|
|
2185
|
-
|
|
2191
|
+
Kn as SeasonsToJSON,
|
|
2186
2192
|
Lt as SeasonsToJSONTyped,
|
|
2187
2193
|
G as SportFromJSON,
|
|
2188
2194
|
ii as SportFromJSONTyped,
|
|
@@ -2203,7 +2209,7 @@ export {
|
|
|
2203
2209
|
hi as TeamToJSONTyped,
|
|
2204
2210
|
Et as TeamsFromJSON,
|
|
2205
2211
|
Ct as TeamsFromJSONTyped,
|
|
2206
|
-
|
|
2212
|
+
qn as TeamsToJSON,
|
|
2207
2213
|
At as TeamsToJSONTyped,
|
|
2208
2214
|
$t as TextApiResponse,
|
|
2209
2215
|
N as VenueFromJSON,
|
|
@@ -2221,14 +2227,14 @@ export {
|
|
|
2221
2227
|
yn as instanceOfDivisionStandings,
|
|
2222
2228
|
On as instanceOfDivisionStandingsList,
|
|
2223
2229
|
Dn as instanceOfDivisions,
|
|
2224
|
-
|
|
2230
|
+
qt as instanceOfFieldingStats,
|
|
2225
2231
|
Rn as instanceOfGame,
|
|
2226
|
-
|
|
2227
|
-
|
|
2232
|
+
Yt as instanceOfGameOfficial,
|
|
2233
|
+
kn as instanceOfGameStatus,
|
|
2228
2234
|
bn as instanceOfGameStatusCode,
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2235
|
+
In as instanceOfGameTeam,
|
|
2236
|
+
Bn as instanceOfGameTeams,
|
|
2237
|
+
Jn as instanceOfGameType,
|
|
2232
2238
|
En as instanceOfInning,
|
|
2233
2239
|
an as instanceOfLeague,
|
|
2234
2240
|
rn as instanceOfLeagueDates,
|
|
@@ -2237,7 +2243,7 @@ export {
|
|
|
2237
2243
|
xn as instanceOfLinescore,
|
|
2238
2244
|
Ln as instanceOfLinescoreTeam,
|
|
2239
2245
|
Wn as instanceOfLinescoreTeams,
|
|
2240
|
-
|
|
2246
|
+
Kt as instanceOfOfficial,
|
|
2241
2247
|
zt as instanceOfPitchingStats,
|
|
2242
2248
|
nn as instanceOfPlayer,
|
|
2243
2249
|
Xt as instanceOfPlayerGameStatus,
|
|
@@ -2256,7 +2262,7 @@ export {
|
|
|
2256
2262
|
dn as instanceOfStreak,
|
|
2257
2263
|
fn as instanceOfTeam,
|
|
2258
2264
|
mn as instanceOfTeamStats,
|
|
2259
|
-
|
|
2265
|
+
Yn as instanceOfTeams,
|
|
2260
2266
|
on as instanceOfVenue,
|
|
2261
2267
|
V as mapValues,
|
|
2262
2268
|
U as querystring
|