@bp1222/stats-api 0.1.5 → 0.1.7
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 +554 -0
- package/dist/index.d.ts +554 -0
- package/dist/index.js +3 -0
- package/dist/index.mjs +1577 -0
- package/package.json +2 -2
- package/src/.openapi-generator/FILES +0 -26
- package/src/.openapi-generator/VERSION +0 -1
- package/src/.openapi-generator-ignore +0 -23
- package/src/apis/MlbApi.ts +0 -325
- package/src/apis/index.ts +0 -3
- package/src/index.ts +0 -5
- package/src/models/MLBDivision.ts +0 -164
- package/src/models/MLBGame.ts +0 -371
- package/src/models/MLBGameStatus.ts +0 -122
- package/src/models/MLBGameTeam.ts +0 -117
- package/src/models/MLBGameTeams.ts +0 -77
- package/src/models/MLBLeague.ts +0 -190
- package/src/models/MLBLeagueDates.ts +0 -132
- package/src/models/MLBLeagueRecord.ts +0 -87
- package/src/models/MLBRecord.ts +0 -337
- package/src/models/MLBSchedule.ts +0 -105
- package/src/models/MLBScheduleDay.ts +0 -108
- package/src/models/MLBSeason.ts +0 -226
- package/src/models/MLBSeasons.ts +0 -67
- package/src/models/MLBSport.ts +0 -110
- package/src/models/MLBStandings.ts +0 -130
- package/src/models/MLBStandingsList.ts +0 -67
- package/src/models/MLBStreak.ts +0 -74
- package/src/models/MLBTeam.ts +0 -248
- package/src/models/MLBTeams.ts +0 -67
- package/src/models/MLBVenue.ts +0 -95
- package/src/models/index.ts +0 -22
- package/src/runtime.ts +0 -426
package/src/models/MLBGame.ts
DELETED
|
@@ -1,371 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* MLB StatAPI
|
|
5
|
-
* An spec API to consume the MLB Stat API
|
|
6
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: 0.1.5
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
-
* https://openapi-generator.tech
|
|
12
|
-
* Do not edit the class manually.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
import { mapValues } from '../runtime';
|
|
16
|
-
import type { MLBVenue } from './MLBVenue';
|
|
17
|
-
import {
|
|
18
|
-
MLBVenueFromJSON,
|
|
19
|
-
MLBVenueFromJSONTyped,
|
|
20
|
-
MLBVenueToJSON,
|
|
21
|
-
} from './MLBVenue';
|
|
22
|
-
import type { MLBGameStatus } from './MLBGameStatus';
|
|
23
|
-
import {
|
|
24
|
-
MLBGameStatusFromJSON,
|
|
25
|
-
MLBGameStatusFromJSONTyped,
|
|
26
|
-
MLBGameStatusToJSON,
|
|
27
|
-
} from './MLBGameStatus';
|
|
28
|
-
import type { MLBGameTeams } from './MLBGameTeams';
|
|
29
|
-
import {
|
|
30
|
-
MLBGameTeamsFromJSON,
|
|
31
|
-
MLBGameTeamsFromJSONTyped,
|
|
32
|
-
MLBGameTeamsToJSON,
|
|
33
|
-
} from './MLBGameTeams';
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Game Thing
|
|
37
|
-
*
|
|
38
|
-
* @export
|
|
39
|
-
* @interface MLBGame
|
|
40
|
-
*/
|
|
41
|
-
export interface MLBGame {
|
|
42
|
-
/**
|
|
43
|
-
*
|
|
44
|
-
* @type {number}
|
|
45
|
-
* @memberof MLBGame
|
|
46
|
-
*/
|
|
47
|
-
gamePk: number;
|
|
48
|
-
/**
|
|
49
|
-
*
|
|
50
|
-
* @type {string}
|
|
51
|
-
* @memberof MLBGame
|
|
52
|
-
*/
|
|
53
|
-
gameGuid: string;
|
|
54
|
-
/**
|
|
55
|
-
*
|
|
56
|
-
* @type {string}
|
|
57
|
-
* @memberof MLBGame
|
|
58
|
-
*/
|
|
59
|
-
link?: string;
|
|
60
|
-
/**
|
|
61
|
-
* Game Type:
|
|
62
|
-
* * `E` - Exhibition
|
|
63
|
-
* * `S` - Spring Training
|
|
64
|
-
* * `R` - Regular Season
|
|
65
|
-
* * `F` - Wild Card Series
|
|
66
|
-
* * `D` - Division Series
|
|
67
|
-
* * `L` - League Championship Series
|
|
68
|
-
* * `W` - World Series
|
|
69
|
-
*
|
|
70
|
-
* @type {string}
|
|
71
|
-
* @memberof MLBGame
|
|
72
|
-
*/
|
|
73
|
-
gameType: MLBGameGameTypeEnum;
|
|
74
|
-
/**
|
|
75
|
-
*
|
|
76
|
-
* @type {number}
|
|
77
|
-
* @memberof MLBGame
|
|
78
|
-
*/
|
|
79
|
-
season: number;
|
|
80
|
-
/**
|
|
81
|
-
*
|
|
82
|
-
* @type {string}
|
|
83
|
-
* @memberof MLBGame
|
|
84
|
-
*/
|
|
85
|
-
gameDate: string;
|
|
86
|
-
/**
|
|
87
|
-
*
|
|
88
|
-
* @type {string}
|
|
89
|
-
* @memberof MLBGame
|
|
90
|
-
*/
|
|
91
|
-
officialDate: string;
|
|
92
|
-
/**
|
|
93
|
-
*
|
|
94
|
-
* @type {number}
|
|
95
|
-
* @memberof MLBGame
|
|
96
|
-
*/
|
|
97
|
-
rescheduledTo?: number;
|
|
98
|
-
/**
|
|
99
|
-
*
|
|
100
|
-
* @type {string}
|
|
101
|
-
* @memberof MLBGame
|
|
102
|
-
*/
|
|
103
|
-
rescheduledToDate?: string;
|
|
104
|
-
/**
|
|
105
|
-
*
|
|
106
|
-
* @type {number}
|
|
107
|
-
* @memberof MLBGame
|
|
108
|
-
*/
|
|
109
|
-
rescheduledFrom?: number;
|
|
110
|
-
/**
|
|
111
|
-
*
|
|
112
|
-
* @type {string}
|
|
113
|
-
* @memberof MLBGame
|
|
114
|
-
*/
|
|
115
|
-
rescheduledFromDate?: string;
|
|
116
|
-
/**
|
|
117
|
-
*
|
|
118
|
-
* @type {MLBGameStatus}
|
|
119
|
-
* @memberof MLBGame
|
|
120
|
-
*/
|
|
121
|
-
status: MLBGameStatus;
|
|
122
|
-
/**
|
|
123
|
-
*
|
|
124
|
-
* @type {MLBGameTeams}
|
|
125
|
-
* @memberof MLBGame
|
|
126
|
-
*/
|
|
127
|
-
teams: MLBGameTeams;
|
|
128
|
-
/**
|
|
129
|
-
*
|
|
130
|
-
* @type {MLBVenue}
|
|
131
|
-
* @memberof MLBGame
|
|
132
|
-
*/
|
|
133
|
-
venue?: MLBVenue;
|
|
134
|
-
/**
|
|
135
|
-
*
|
|
136
|
-
* @type {boolean}
|
|
137
|
-
* @memberof MLBGame
|
|
138
|
-
*/
|
|
139
|
-
isTie?: boolean;
|
|
140
|
-
/**
|
|
141
|
-
*
|
|
142
|
-
* @type {number}
|
|
143
|
-
* @memberof MLBGame
|
|
144
|
-
*/
|
|
145
|
-
gameNumber: number;
|
|
146
|
-
/**
|
|
147
|
-
*
|
|
148
|
-
* @type {boolean}
|
|
149
|
-
* @memberof MLBGame
|
|
150
|
-
*/
|
|
151
|
-
publicFacing?: boolean;
|
|
152
|
-
/**
|
|
153
|
-
*
|
|
154
|
-
* @type {string}
|
|
155
|
-
* @memberof MLBGame
|
|
156
|
-
*/
|
|
157
|
-
doubleHeader?: string;
|
|
158
|
-
/**
|
|
159
|
-
*
|
|
160
|
-
* @type {string}
|
|
161
|
-
* @memberof MLBGame
|
|
162
|
-
*/
|
|
163
|
-
gamedayType?: string;
|
|
164
|
-
/**
|
|
165
|
-
*
|
|
166
|
-
* @type {string}
|
|
167
|
-
* @memberof MLBGame
|
|
168
|
-
*/
|
|
169
|
-
tiebreaker?: string;
|
|
170
|
-
/**
|
|
171
|
-
*
|
|
172
|
-
* @type {string}
|
|
173
|
-
* @memberof MLBGame
|
|
174
|
-
*/
|
|
175
|
-
calendarEventID?: string;
|
|
176
|
-
/**
|
|
177
|
-
*
|
|
178
|
-
* @type {string}
|
|
179
|
-
* @memberof MLBGame
|
|
180
|
-
*/
|
|
181
|
-
seasonDisplay?: string;
|
|
182
|
-
/**
|
|
183
|
-
*
|
|
184
|
-
* @type {string}
|
|
185
|
-
* @memberof MLBGame
|
|
186
|
-
*/
|
|
187
|
-
dayNight?: string;
|
|
188
|
-
/**
|
|
189
|
-
*
|
|
190
|
-
* @type {string}
|
|
191
|
-
* @memberof MLBGame
|
|
192
|
-
*/
|
|
193
|
-
description?: string;
|
|
194
|
-
/**
|
|
195
|
-
*
|
|
196
|
-
* @type {number}
|
|
197
|
-
* @memberof MLBGame
|
|
198
|
-
*/
|
|
199
|
-
scheduledInnings?: number;
|
|
200
|
-
/**
|
|
201
|
-
*
|
|
202
|
-
* @type {boolean}
|
|
203
|
-
* @memberof MLBGame
|
|
204
|
-
*/
|
|
205
|
-
reverseHomeAwayStatus?: boolean;
|
|
206
|
-
/**
|
|
207
|
-
*
|
|
208
|
-
* @type {number}
|
|
209
|
-
* @memberof MLBGame
|
|
210
|
-
*/
|
|
211
|
-
inningBreakLength?: number;
|
|
212
|
-
/**
|
|
213
|
-
*
|
|
214
|
-
* @type {number}
|
|
215
|
-
* @memberof MLBGame
|
|
216
|
-
*/
|
|
217
|
-
gamesInSeries: number;
|
|
218
|
-
/**
|
|
219
|
-
*
|
|
220
|
-
* @type {number}
|
|
221
|
-
* @memberof MLBGame
|
|
222
|
-
*/
|
|
223
|
-
seriesGameNumber: number;
|
|
224
|
-
/**
|
|
225
|
-
*
|
|
226
|
-
* @type {string}
|
|
227
|
-
* @memberof MLBGame
|
|
228
|
-
*/
|
|
229
|
-
seriesDescription?: string;
|
|
230
|
-
/**
|
|
231
|
-
*
|
|
232
|
-
* @type {string}
|
|
233
|
-
* @memberof MLBGame
|
|
234
|
-
*/
|
|
235
|
-
recordSource?: string;
|
|
236
|
-
/**
|
|
237
|
-
*
|
|
238
|
-
* @type {string}
|
|
239
|
-
* @memberof MLBGame
|
|
240
|
-
*/
|
|
241
|
-
ifNecessary?: string;
|
|
242
|
-
/**
|
|
243
|
-
*
|
|
244
|
-
* @type {string}
|
|
245
|
-
* @memberof MLBGame
|
|
246
|
-
*/
|
|
247
|
-
ifNecessaryDescription?: string;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
/**
|
|
252
|
-
* @export
|
|
253
|
-
*/
|
|
254
|
-
export const MLBGameGameTypeEnum = {
|
|
255
|
-
Exhibition: 'E',
|
|
256
|
-
SpringTraining: 'S',
|
|
257
|
-
Regular: 'R',
|
|
258
|
-
WildCardSeries: 'F',
|
|
259
|
-
DivisionSeries: 'D',
|
|
260
|
-
LeagueChampionshipSeries: 'L',
|
|
261
|
-
WorldSeries: 'W'
|
|
262
|
-
} as const;
|
|
263
|
-
export type MLBGameGameTypeEnum = typeof MLBGameGameTypeEnum[keyof typeof MLBGameGameTypeEnum];
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
/**
|
|
267
|
-
* Check if a given object implements the MLBGame interface.
|
|
268
|
-
*/
|
|
269
|
-
export function instanceOfMLBGame(value: object): value is MLBGame {
|
|
270
|
-
if (!('gamePk' in value) || value['gamePk'] === undefined) return false;
|
|
271
|
-
if (!('gameGuid' in value) || value['gameGuid'] === undefined) return false;
|
|
272
|
-
if (!('gameType' in value) || value['gameType'] === undefined) return false;
|
|
273
|
-
if (!('season' in value) || value['season'] === undefined) return false;
|
|
274
|
-
if (!('gameDate' in value) || value['gameDate'] === undefined) return false;
|
|
275
|
-
if (!('officialDate' in value) || value['officialDate'] === undefined) return false;
|
|
276
|
-
if (!('status' in value) || value['status'] === undefined) return false;
|
|
277
|
-
if (!('teams' in value) || value['teams'] === undefined) return false;
|
|
278
|
-
if (!('gameNumber' in value) || value['gameNumber'] === undefined) return false;
|
|
279
|
-
if (!('gamesInSeries' in value) || value['gamesInSeries'] === undefined) return false;
|
|
280
|
-
if (!('seriesGameNumber' in value) || value['seriesGameNumber'] === undefined) return false;
|
|
281
|
-
return true;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
export function MLBGameFromJSON(json: any): MLBGame {
|
|
285
|
-
return MLBGameFromJSONTyped(json, false);
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
export function MLBGameFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBGame {
|
|
289
|
-
if (json == null) {
|
|
290
|
-
return json;
|
|
291
|
-
}
|
|
292
|
-
return {
|
|
293
|
-
|
|
294
|
-
'gamePk': json['gamePk'],
|
|
295
|
-
'gameGuid': json['gameGuid'],
|
|
296
|
-
'link': json['link'] == null ? undefined : json['link'],
|
|
297
|
-
'gameType': json['gameType'],
|
|
298
|
-
'season': json['season'],
|
|
299
|
-
'gameDate': json['gameDate'],
|
|
300
|
-
'officialDate': json['officialDate'],
|
|
301
|
-
'rescheduledTo': json['rescheduledTo'] == null ? undefined : json['rescheduledTo'],
|
|
302
|
-
'rescheduledToDate': json['rescheduledToDate'] == null ? undefined : json['rescheduledToDate'],
|
|
303
|
-
'rescheduledFrom': json['rescheduledFrom'] == null ? undefined : json['rescheduledFrom'],
|
|
304
|
-
'rescheduledFromDate': json['rescheduledFromDate'] == null ? undefined : json['rescheduledFromDate'],
|
|
305
|
-
'status': MLBGameStatusFromJSON(json['status']),
|
|
306
|
-
'teams': MLBGameTeamsFromJSON(json['teams']),
|
|
307
|
-
'venue': json['venue'] == null ? undefined : MLBVenueFromJSON(json['venue']),
|
|
308
|
-
'isTie': json['isTie'] == null ? undefined : json['isTie'],
|
|
309
|
-
'gameNumber': json['gameNumber'],
|
|
310
|
-
'publicFacing': json['publicFacing'] == null ? undefined : json['publicFacing'],
|
|
311
|
-
'doubleHeader': json['doubleHeader'] == null ? undefined : json['doubleHeader'],
|
|
312
|
-
'gamedayType': json['gamedayType'] == null ? undefined : json['gamedayType'],
|
|
313
|
-
'tiebreaker': json['tiebreaker'] == null ? undefined : json['tiebreaker'],
|
|
314
|
-
'calendarEventID': json['calendarEventID'] == null ? undefined : json['calendarEventID'],
|
|
315
|
-
'seasonDisplay': json['seasonDisplay'] == null ? undefined : json['seasonDisplay'],
|
|
316
|
-
'dayNight': json['dayNight'] == null ? undefined : json['dayNight'],
|
|
317
|
-
'description': json['description'] == null ? undefined : json['description'],
|
|
318
|
-
'scheduledInnings': json['scheduledInnings'] == null ? undefined : json['scheduledInnings'],
|
|
319
|
-
'reverseHomeAwayStatus': json['reverseHomeAwayStatus'] == null ? undefined : json['reverseHomeAwayStatus'],
|
|
320
|
-
'inningBreakLength': json['inningBreakLength'] == null ? undefined : json['inningBreakLength'],
|
|
321
|
-
'gamesInSeries': json['gamesInSeries'],
|
|
322
|
-
'seriesGameNumber': json['seriesGameNumber'],
|
|
323
|
-
'seriesDescription': json['seriesDescription'] == null ? undefined : json['seriesDescription'],
|
|
324
|
-
'recordSource': json['recordSource'] == null ? undefined : json['recordSource'],
|
|
325
|
-
'ifNecessary': json['ifNecessary'] == null ? undefined : json['ifNecessary'],
|
|
326
|
-
'ifNecessaryDescription': json['ifNecessaryDescription'] == null ? undefined : json['ifNecessaryDescription'],
|
|
327
|
-
};
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
export function MLBGameToJSON(value?: MLBGame | null): any {
|
|
331
|
-
if (value == null) {
|
|
332
|
-
return value;
|
|
333
|
-
}
|
|
334
|
-
return {
|
|
335
|
-
|
|
336
|
-
'gamePk': value['gamePk'],
|
|
337
|
-
'gameGuid': value['gameGuid'],
|
|
338
|
-
'link': value['link'],
|
|
339
|
-
'gameType': value['gameType'],
|
|
340
|
-
'season': value['season'],
|
|
341
|
-
'gameDate': value['gameDate'],
|
|
342
|
-
'officialDate': value['officialDate'],
|
|
343
|
-
'rescheduledTo': value['rescheduledTo'],
|
|
344
|
-
'rescheduledToDate': value['rescheduledToDate'],
|
|
345
|
-
'rescheduledFrom': value['rescheduledFrom'],
|
|
346
|
-
'rescheduledFromDate': value['rescheduledFromDate'],
|
|
347
|
-
'status': MLBGameStatusToJSON(value['status']),
|
|
348
|
-
'teams': MLBGameTeamsToJSON(value['teams']),
|
|
349
|
-
'venue': MLBVenueToJSON(value['venue']),
|
|
350
|
-
'isTie': value['isTie'],
|
|
351
|
-
'gameNumber': value['gameNumber'],
|
|
352
|
-
'publicFacing': value['publicFacing'],
|
|
353
|
-
'doubleHeader': value['doubleHeader'],
|
|
354
|
-
'gamedayType': value['gamedayType'],
|
|
355
|
-
'tiebreaker': value['tiebreaker'],
|
|
356
|
-
'calendarEventID': value['calendarEventID'],
|
|
357
|
-
'seasonDisplay': value['seasonDisplay'],
|
|
358
|
-
'dayNight': value['dayNight'],
|
|
359
|
-
'description': value['description'],
|
|
360
|
-
'scheduledInnings': value['scheduledInnings'],
|
|
361
|
-
'reverseHomeAwayStatus': value['reverseHomeAwayStatus'],
|
|
362
|
-
'inningBreakLength': value['inningBreakLength'],
|
|
363
|
-
'gamesInSeries': value['gamesInSeries'],
|
|
364
|
-
'seriesGameNumber': value['seriesGameNumber'],
|
|
365
|
-
'seriesDescription': value['seriesDescription'],
|
|
366
|
-
'recordSource': value['recordSource'],
|
|
367
|
-
'ifNecessary': value['ifNecessary'],
|
|
368
|
-
'ifNecessaryDescription': value['ifNecessaryDescription'],
|
|
369
|
-
};
|
|
370
|
-
}
|
|
371
|
-
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* MLB StatAPI
|
|
5
|
-
* An spec API to consume the MLB Stat API
|
|
6
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: 0.1.5
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
-
* https://openapi-generator.tech
|
|
12
|
-
* Do not edit the class manually.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
import { mapValues } from '../runtime';
|
|
16
|
-
/**
|
|
17
|
-
*
|
|
18
|
-
* @export
|
|
19
|
-
* @interface MLBGameStatus
|
|
20
|
-
*/
|
|
21
|
-
export interface MLBGameStatus {
|
|
22
|
-
/**
|
|
23
|
-
*
|
|
24
|
-
* @type {string}
|
|
25
|
-
* @memberof MLBGameStatus
|
|
26
|
-
*/
|
|
27
|
-
abstractGameState?: string;
|
|
28
|
-
/**
|
|
29
|
-
* Coded Game State
|
|
30
|
-
* * `F` - Final
|
|
31
|
-
* * `D` - Delayed/Postponed
|
|
32
|
-
* * `S` - Scheduled
|
|
33
|
-
* * `I` - In Progress
|
|
34
|
-
* * `P` - Pregame
|
|
35
|
-
* * `O` - Game Over
|
|
36
|
-
*
|
|
37
|
-
* @type {string}
|
|
38
|
-
* @memberof MLBGameStatus
|
|
39
|
-
*/
|
|
40
|
-
codedGameState?: MLBGameStatusCodedGameStateEnum;
|
|
41
|
-
/**
|
|
42
|
-
*
|
|
43
|
-
* @type {string}
|
|
44
|
-
* @memberof MLBGameStatus
|
|
45
|
-
*/
|
|
46
|
-
detailedState?: string;
|
|
47
|
-
/**
|
|
48
|
-
*
|
|
49
|
-
* @type {string}
|
|
50
|
-
* @memberof MLBGameStatus
|
|
51
|
-
*/
|
|
52
|
-
statusCode?: string;
|
|
53
|
-
/**
|
|
54
|
-
*
|
|
55
|
-
* @type {boolean}
|
|
56
|
-
* @memberof MLBGameStatus
|
|
57
|
-
*/
|
|
58
|
-
startTimeTBD?: boolean;
|
|
59
|
-
/**
|
|
60
|
-
*
|
|
61
|
-
* @type {string}
|
|
62
|
-
* @memberof MLBGameStatus
|
|
63
|
-
*/
|
|
64
|
-
abstractGameCode?: string;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* @export
|
|
70
|
-
*/
|
|
71
|
-
export const MLBGameStatusCodedGameStateEnum = {
|
|
72
|
-
Final: 'F',
|
|
73
|
-
Postponed: 'D',
|
|
74
|
-
Scheduled: 'S',
|
|
75
|
-
InProgress: 'I',
|
|
76
|
-
Pregame: 'P',
|
|
77
|
-
GameOver: 'O'
|
|
78
|
-
} as const;
|
|
79
|
-
export type MLBGameStatusCodedGameStateEnum = typeof MLBGameStatusCodedGameStateEnum[keyof typeof MLBGameStatusCodedGameStateEnum];
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Check if a given object implements the MLBGameStatus interface.
|
|
84
|
-
*/
|
|
85
|
-
export function instanceOfMLBGameStatus(value: object): value is MLBGameStatus {
|
|
86
|
-
return true;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export function MLBGameStatusFromJSON(json: any): MLBGameStatus {
|
|
90
|
-
return MLBGameStatusFromJSONTyped(json, false);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export function MLBGameStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBGameStatus {
|
|
94
|
-
if (json == null) {
|
|
95
|
-
return json;
|
|
96
|
-
}
|
|
97
|
-
return {
|
|
98
|
-
|
|
99
|
-
'abstractGameState': json['abstractGameState'] == null ? undefined : json['abstractGameState'],
|
|
100
|
-
'codedGameState': json['codedGameState'] == null ? undefined : json['codedGameState'],
|
|
101
|
-
'detailedState': json['detailedState'] == null ? undefined : json['detailedState'],
|
|
102
|
-
'statusCode': json['statusCode'] == null ? undefined : json['statusCode'],
|
|
103
|
-
'startTimeTBD': json['startTimeTBD'] == null ? undefined : json['startTimeTBD'],
|
|
104
|
-
'abstractGameCode': json['abstractGameCode'] == null ? undefined : json['abstractGameCode'],
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export function MLBGameStatusToJSON(value?: MLBGameStatus | null): any {
|
|
109
|
-
if (value == null) {
|
|
110
|
-
return value;
|
|
111
|
-
}
|
|
112
|
-
return {
|
|
113
|
-
|
|
114
|
-
'abstractGameState': value['abstractGameState'],
|
|
115
|
-
'codedGameState': value['codedGameState'],
|
|
116
|
-
'detailedState': value['detailedState'],
|
|
117
|
-
'statusCode': value['statusCode'],
|
|
118
|
-
'startTimeTBD': value['startTimeTBD'],
|
|
119
|
-
'abstractGameCode': value['abstractGameCode'],
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* MLB StatAPI
|
|
5
|
-
* An spec API to consume the MLB Stat API
|
|
6
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: 0.1.5
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
-
* https://openapi-generator.tech
|
|
12
|
-
* Do not edit the class manually.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
import { mapValues } from '../runtime';
|
|
16
|
-
import type { MLBTeam } from './MLBTeam';
|
|
17
|
-
import {
|
|
18
|
-
MLBTeamFromJSON,
|
|
19
|
-
MLBTeamFromJSONTyped,
|
|
20
|
-
MLBTeamToJSON,
|
|
21
|
-
} from './MLBTeam';
|
|
22
|
-
import type { MLBLeagueRecord } from './MLBLeagueRecord';
|
|
23
|
-
import {
|
|
24
|
-
MLBLeagueRecordFromJSON,
|
|
25
|
-
MLBLeagueRecordFromJSONTyped,
|
|
26
|
-
MLBLeagueRecordToJSON,
|
|
27
|
-
} from './MLBLeagueRecord';
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Game Team
|
|
31
|
-
*
|
|
32
|
-
* @export
|
|
33
|
-
* @interface MLBGameTeam
|
|
34
|
-
*/
|
|
35
|
-
export interface MLBGameTeam {
|
|
36
|
-
/**
|
|
37
|
-
*
|
|
38
|
-
* @type {MLBLeagueRecord}
|
|
39
|
-
* @memberof MLBGameTeam
|
|
40
|
-
*/
|
|
41
|
-
leagueRecord?: MLBLeagueRecord;
|
|
42
|
-
/**
|
|
43
|
-
*
|
|
44
|
-
* @type {number}
|
|
45
|
-
* @memberof MLBGameTeam
|
|
46
|
-
*/
|
|
47
|
-
score: number;
|
|
48
|
-
/**
|
|
49
|
-
*
|
|
50
|
-
* @type {MLBTeam}
|
|
51
|
-
* @memberof MLBGameTeam
|
|
52
|
-
*/
|
|
53
|
-
team: MLBTeam;
|
|
54
|
-
/**
|
|
55
|
-
*
|
|
56
|
-
* @type {boolean}
|
|
57
|
-
* @memberof MLBGameTeam
|
|
58
|
-
*/
|
|
59
|
-
isWinner: boolean;
|
|
60
|
-
/**
|
|
61
|
-
*
|
|
62
|
-
* @type {boolean}
|
|
63
|
-
* @memberof MLBGameTeam
|
|
64
|
-
*/
|
|
65
|
-
splitSquad?: boolean;
|
|
66
|
-
/**
|
|
67
|
-
*
|
|
68
|
-
* @type {number}
|
|
69
|
-
* @memberof MLBGameTeam
|
|
70
|
-
*/
|
|
71
|
-
seriesNumber?: number;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Check if a given object implements the MLBGameTeam interface.
|
|
76
|
-
*/
|
|
77
|
-
export function instanceOfMLBGameTeam(value: object): value is MLBGameTeam {
|
|
78
|
-
if (!('score' in value) || value['score'] === undefined) return false;
|
|
79
|
-
if (!('team' in value) || value['team'] === undefined) return false;
|
|
80
|
-
if (!('isWinner' in value) || value['isWinner'] === undefined) return false;
|
|
81
|
-
return true;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export function MLBGameTeamFromJSON(json: any): MLBGameTeam {
|
|
85
|
-
return MLBGameTeamFromJSONTyped(json, false);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export function MLBGameTeamFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBGameTeam {
|
|
89
|
-
if (json == null) {
|
|
90
|
-
return json;
|
|
91
|
-
}
|
|
92
|
-
return {
|
|
93
|
-
|
|
94
|
-
'leagueRecord': json['leagueRecord'] == null ? undefined : MLBLeagueRecordFromJSON(json['leagueRecord']),
|
|
95
|
-
'score': json['score'],
|
|
96
|
-
'team': MLBTeamFromJSON(json['team']),
|
|
97
|
-
'isWinner': json['isWinner'],
|
|
98
|
-
'splitSquad': json['splitSquad'] == null ? undefined : json['splitSquad'],
|
|
99
|
-
'seriesNumber': json['seriesNumber'] == null ? undefined : json['seriesNumber'],
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export function MLBGameTeamToJSON(value?: MLBGameTeam | null): any {
|
|
104
|
-
if (value == null) {
|
|
105
|
-
return value;
|
|
106
|
-
}
|
|
107
|
-
return {
|
|
108
|
-
|
|
109
|
-
'leagueRecord': MLBLeagueRecordToJSON(value['leagueRecord']),
|
|
110
|
-
'score': value['score'],
|
|
111
|
-
'team': MLBTeamToJSON(value['team']),
|
|
112
|
-
'isWinner': value['isWinner'],
|
|
113
|
-
'splitSquad': value['splitSquad'],
|
|
114
|
-
'seriesNumber': value['seriesNumber'],
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* MLB StatAPI
|
|
5
|
-
* An spec API to consume the MLB Stat API
|
|
6
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: 0.1.5
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
-
* https://openapi-generator.tech
|
|
12
|
-
* Do not edit the class manually.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
import { mapValues } from '../runtime';
|
|
16
|
-
import type { MLBGameTeam } from './MLBGameTeam';
|
|
17
|
-
import {
|
|
18
|
-
MLBGameTeamFromJSON,
|
|
19
|
-
MLBGameTeamFromJSONTyped,
|
|
20
|
-
MLBGameTeamToJSON,
|
|
21
|
-
} from './MLBGameTeam';
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
*
|
|
25
|
-
* @export
|
|
26
|
-
* @interface MLBGameTeams
|
|
27
|
-
*/
|
|
28
|
-
export interface MLBGameTeams {
|
|
29
|
-
/**
|
|
30
|
-
*
|
|
31
|
-
* @type {MLBGameTeam}
|
|
32
|
-
* @memberof MLBGameTeams
|
|
33
|
-
*/
|
|
34
|
-
away: MLBGameTeam;
|
|
35
|
-
/**
|
|
36
|
-
*
|
|
37
|
-
* @type {MLBGameTeam}
|
|
38
|
-
* @memberof MLBGameTeams
|
|
39
|
-
*/
|
|
40
|
-
home: MLBGameTeam;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Check if a given object implements the MLBGameTeams interface.
|
|
45
|
-
*/
|
|
46
|
-
export function instanceOfMLBGameTeams(value: object): value is MLBGameTeams {
|
|
47
|
-
if (!('away' in value) || value['away'] === undefined) return false;
|
|
48
|
-
if (!('home' in value) || value['home'] === undefined) return false;
|
|
49
|
-
return true;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export function MLBGameTeamsFromJSON(json: any): MLBGameTeams {
|
|
53
|
-
return MLBGameTeamsFromJSONTyped(json, false);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export function MLBGameTeamsFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBGameTeams {
|
|
57
|
-
if (json == null) {
|
|
58
|
-
return json;
|
|
59
|
-
}
|
|
60
|
-
return {
|
|
61
|
-
|
|
62
|
-
'away': MLBGameTeamFromJSON(json['away']),
|
|
63
|
-
'home': MLBGameTeamFromJSON(json['home']),
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export function MLBGameTeamsToJSON(value?: MLBGameTeams | null): any {
|
|
68
|
-
if (value == null) {
|
|
69
|
-
return value;
|
|
70
|
-
}
|
|
71
|
-
return {
|
|
72
|
-
|
|
73
|
-
'away': MLBGameTeamToJSON(value['away']),
|
|
74
|
-
'home': MLBGameTeamToJSON(value['home']),
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
|