@bp1222/stats-api 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/Makefile +26 -0
  2. package/openapitools.json +14 -0
  3. package/package.json +20 -0
  4. package/spec/components/parameters/parameters.yaml +21 -0
  5. package/spec/components/parameters/query/date.yaml +5 -0
  6. package/spec/components/parameters/query/endDate.yaml +5 -0
  7. package/spec/components/parameters/query/eventTypes.yaml +5 -0
  8. package/spec/components/parameters/query/fields.yaml +10 -0
  9. package/spec/components/parameters/query/gamePks.yaml +5 -0
  10. package/spec/components/parameters/query/gameTypes.yaml +5 -0
  11. package/spec/components/parameters/query/hydrate.yaml +5 -0
  12. package/spec/components/parameters/query/leagueId.yaml +5 -0
  13. package/spec/components/parameters/query/leagueIds.yaml +7 -0
  14. package/spec/components/parameters/query/opponentId.yaml +5 -0
  15. package/spec/components/parameters/query/scheduleType.yaml +5 -0
  16. package/spec/components/parameters/query/season.yaml +5 -0
  17. package/spec/components/parameters/query/sportId.yaml +6 -0
  18. package/spec/components/parameters/query/startDate.yaml +5 -0
  19. package/spec/components/parameters/query/teamId.yaml +5 -0
  20. package/spec/components/parameters/query/venueIds.yaml +5 -0
  21. package/spec/components/schemas/division.yaml +32 -0
  22. package/spec/components/schemas/game.yaml +157 -0
  23. package/spec/components/schemas/gameTeam.yaml +30 -0
  24. package/spec/components/schemas/league.yaml +62 -0
  25. package/spec/components/schemas/record.yaml +110 -0
  26. package/spec/components/schemas/schedule.yaml +41 -0
  27. package/spec/components/schemas/schemas.yaml +22 -0
  28. package/spec/components/schemas/season.yaml +53 -0
  29. package/spec/components/schemas/sport.yaml +21 -0
  30. package/spec/components/schemas/standings.yaml +24 -0
  31. package/spec/components/schemas/team.yaml +50 -0
  32. package/spec/components/schemas/venue.yaml +18 -0
  33. package/spec/openapi.yaml +32 -0
  34. package/spec/paths/allSeasons.yaml +23 -0
  35. package/spec/paths/schedule.yaml +20 -0
  36. package/spec/paths/season.yaml +18 -0
  37. package/spec/paths/standings.yaml +27 -0
  38. package/spec/paths/teams.yaml +33 -0
  39. package/src/.openapi-generator/FILES +27 -0
  40. package/src/.openapi-generator/VERSION +1 -0
  41. package/src/.openapi-generator-ignore +23 -0
  42. package/src/apis/MlbApi.ts +328 -0
  43. package/src/apis/index.ts +3 -0
  44. package/src/index.ts +5 -0
  45. package/src/models/Division.ts +164 -0
  46. package/src/models/Game.ts +385 -0
  47. package/src/models/GameContent.ts +60 -0
  48. package/src/models/GameTeam.ts +117 -0
  49. package/src/models/GameTeams.ts +77 -0
  50. package/src/models/League.ts +190 -0
  51. package/src/models/MLBDivision.ts +164 -0
  52. package/src/models/MLBGame.ts +385 -0
  53. package/src/models/MLBGameContent.ts +60 -0
  54. package/src/models/MLBGameStatus.ts +122 -0
  55. package/src/models/MLBGameTeam.ts +117 -0
  56. package/src/models/MLBGameTeams.ts +77 -0
  57. package/src/models/MLBLeague.ts +190 -0
  58. package/src/models/MLBLeagueDates.ts +132 -0
  59. package/src/models/MLBRecord.ts +337 -0
  60. package/src/models/MLBSchedule.ts +105 -0
  61. package/src/models/MLBScheduleDay.ts +108 -0
  62. package/src/models/MLBSeason.ts +226 -0
  63. package/src/models/MLBSeasons.ts +67 -0
  64. package/src/models/MLBSport.ts +110 -0
  65. package/src/models/MLBStandings.ts +130 -0
  66. package/src/models/MLBStandingsList.ts +67 -0
  67. package/src/models/MLBStreak.ts +74 -0
  68. package/src/models/MLBTeam.ts +248 -0
  69. package/src/models/MLBTeamRecord.ts +76 -0
  70. package/src/models/MLBTeamRecord1.ts +88 -0
  71. package/src/models/MLBTeams.ts +67 -0
  72. package/src/models/MLBVenue.ts +95 -0
  73. package/src/models/Record.ts +337 -0
  74. package/src/models/Schedule.ts +105 -0
  75. package/src/models/Season.ts +226 -0
  76. package/src/models/Sport.ts +110 -0
  77. package/src/models/Standings.ts +130 -0
  78. package/src/models/Team.ts +248 -0
  79. package/src/models/Venue.ts +95 -0
  80. package/src/models/index.ts +24 -0
  81. package/src/runtime.ts +426 -0
  82. package/tsconfig.json +108 -0
@@ -0,0 +1,385 @@
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.0.1
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 { MLBGameContent } from './MLBGameContent';
23
+ import {
24
+ MLBGameContentFromJSON,
25
+ MLBGameContentFromJSONTyped,
26
+ MLBGameContentToJSON,
27
+ } from './MLBGameContent';
28
+ import type { MLBGameStatus } from './MLBGameStatus';
29
+ import {
30
+ MLBGameStatusFromJSON,
31
+ MLBGameStatusFromJSONTyped,
32
+ MLBGameStatusToJSON,
33
+ } from './MLBGameStatus';
34
+ import type { MLBGameTeams } from './MLBGameTeams';
35
+ import {
36
+ MLBGameTeamsFromJSON,
37
+ MLBGameTeamsFromJSONTyped,
38
+ MLBGameTeamsToJSON,
39
+ } from './MLBGameTeams';
40
+
41
+ /**
42
+ * Game
43
+ *
44
+ * @export
45
+ * @interface MLBGame
46
+ */
47
+ export interface MLBGame {
48
+ /**
49
+ *
50
+ * @type {number}
51
+ * @memberof MLBGame
52
+ */
53
+ gamePk: number;
54
+ /**
55
+ *
56
+ * @type {string}
57
+ * @memberof MLBGame
58
+ */
59
+ gameGuid: string;
60
+ /**
61
+ *
62
+ * @type {string}
63
+ * @memberof MLBGame
64
+ */
65
+ link?: string;
66
+ /**
67
+ * Game Type:
68
+ * * `E` - Exhibition
69
+ * * `S` - Spring Training
70
+ * * `R` - Regular Season
71
+ * * `F` - Wild Card Series
72
+ * * `D` - Division Series
73
+ * * `L` - League Championship Series
74
+ * * `W` - World Series
75
+ *
76
+ * @type {string}
77
+ * @memberof MLBGame
78
+ */
79
+ gameType: MLBGameGameTypeEnum;
80
+ /**
81
+ *
82
+ * @type {number}
83
+ * @memberof MLBGame
84
+ */
85
+ season: number;
86
+ /**
87
+ *
88
+ * @type {string}
89
+ * @memberof MLBGame
90
+ */
91
+ gameDate: string;
92
+ /**
93
+ *
94
+ * @type {string}
95
+ * @memberof MLBGame
96
+ */
97
+ officialDate: string;
98
+ /**
99
+ *
100
+ * @type {number}
101
+ * @memberof MLBGame
102
+ */
103
+ rescheduledTo?: number;
104
+ /**
105
+ *
106
+ * @type {string}
107
+ * @memberof MLBGame
108
+ */
109
+ rescheduledToDate?: string;
110
+ /**
111
+ *
112
+ * @type {number}
113
+ * @memberof MLBGame
114
+ */
115
+ rescheduledFrom?: number;
116
+ /**
117
+ *
118
+ * @type {string}
119
+ * @memberof MLBGame
120
+ */
121
+ rescheduledFromDate?: string;
122
+ /**
123
+ *
124
+ * @type {MLBGameStatus}
125
+ * @memberof MLBGame
126
+ */
127
+ status: MLBGameStatus;
128
+ /**
129
+ *
130
+ * @type {MLBGameTeams}
131
+ * @memberof MLBGame
132
+ */
133
+ teams: MLBGameTeams;
134
+ /**
135
+ *
136
+ * @type {MLBVenue}
137
+ * @memberof MLBGame
138
+ */
139
+ venue?: MLBVenue;
140
+ /**
141
+ *
142
+ * @type {MLBGameContent}
143
+ * @memberof MLBGame
144
+ */
145
+ content?: MLBGameContent;
146
+ /**
147
+ *
148
+ * @type {boolean}
149
+ * @memberof MLBGame
150
+ */
151
+ isTie?: boolean;
152
+ /**
153
+ *
154
+ * @type {number}
155
+ * @memberof MLBGame
156
+ */
157
+ gameNumber: number;
158
+ /**
159
+ *
160
+ * @type {boolean}
161
+ * @memberof MLBGame
162
+ */
163
+ publicFacing?: boolean;
164
+ /**
165
+ *
166
+ * @type {string}
167
+ * @memberof MLBGame
168
+ */
169
+ doubleHeader?: string;
170
+ /**
171
+ *
172
+ * @type {string}
173
+ * @memberof MLBGame
174
+ */
175
+ gamedayType?: string;
176
+ /**
177
+ *
178
+ * @type {string}
179
+ * @memberof MLBGame
180
+ */
181
+ tiebreaker?: string;
182
+ /**
183
+ *
184
+ * @type {string}
185
+ * @memberof MLBGame
186
+ */
187
+ calendarEventID?: string;
188
+ /**
189
+ *
190
+ * @type {string}
191
+ * @memberof MLBGame
192
+ */
193
+ seasonDisplay?: string;
194
+ /**
195
+ *
196
+ * @type {string}
197
+ * @memberof MLBGame
198
+ */
199
+ dayNight?: string;
200
+ /**
201
+ *
202
+ * @type {string}
203
+ * @memberof MLBGame
204
+ */
205
+ description?: string;
206
+ /**
207
+ *
208
+ * @type {number}
209
+ * @memberof MLBGame
210
+ */
211
+ scheduledInnings?: number;
212
+ /**
213
+ *
214
+ * @type {boolean}
215
+ * @memberof MLBGame
216
+ */
217
+ reverseHomeAwayStatus?: boolean;
218
+ /**
219
+ *
220
+ * @type {number}
221
+ * @memberof MLBGame
222
+ */
223
+ inningBreakLength?: number;
224
+ /**
225
+ *
226
+ * @type {number}
227
+ * @memberof MLBGame
228
+ */
229
+ gamesInSeries: number;
230
+ /**
231
+ *
232
+ * @type {number}
233
+ * @memberof MLBGame
234
+ */
235
+ seriesGameNumber: number;
236
+ /**
237
+ *
238
+ * @type {string}
239
+ * @memberof MLBGame
240
+ */
241
+ seriesDescription?: string;
242
+ /**
243
+ *
244
+ * @type {string}
245
+ * @memberof MLBGame
246
+ */
247
+ recordSource?: string;
248
+ /**
249
+ *
250
+ * @type {string}
251
+ * @memberof MLBGame
252
+ */
253
+ ifNecessary?: string;
254
+ /**
255
+ *
256
+ * @type {string}
257
+ * @memberof MLBGame
258
+ */
259
+ ifNecessaryDescription?: string;
260
+ }
261
+
262
+
263
+ /**
264
+ * @export
265
+ */
266
+ export const MLBGameGameTypeEnum = {
267
+ Exhibition: 'E',
268
+ SpringTraining: 'S',
269
+ Regular: 'R',
270
+ WildCardSeries: 'F',
271
+ DivisionSeries: 'D',
272
+ LeagueChampionshipSeries: 'L',
273
+ WorldSeries: 'W'
274
+ } as const;
275
+ export type MLBGameGameTypeEnum = typeof MLBGameGameTypeEnum[keyof typeof MLBGameGameTypeEnum];
276
+
277
+
278
+ /**
279
+ * Check if a given object implements the MLBGame interface.
280
+ */
281
+ export function instanceOfMLBGame(value: object): value is MLBGame {
282
+ if (!('gamePk' in value) || value['gamePk'] === undefined) return false;
283
+ if (!('gameGuid' in value) || value['gameGuid'] === undefined) return false;
284
+ if (!('gameType' in value) || value['gameType'] === undefined) return false;
285
+ if (!('season' in value) || value['season'] === undefined) return false;
286
+ if (!('gameDate' in value) || value['gameDate'] === undefined) return false;
287
+ if (!('officialDate' in value) || value['officialDate'] === undefined) return false;
288
+ if (!('status' in value) || value['status'] === undefined) return false;
289
+ if (!('teams' in value) || value['teams'] === undefined) return false;
290
+ if (!('gameNumber' in value) || value['gameNumber'] === undefined) return false;
291
+ if (!('gamesInSeries' in value) || value['gamesInSeries'] === undefined) return false;
292
+ if (!('seriesGameNumber' in value) || value['seriesGameNumber'] === undefined) return false;
293
+ return true;
294
+ }
295
+
296
+ export function MLBGameFromJSON(json: any): MLBGame {
297
+ return MLBGameFromJSONTyped(json, false);
298
+ }
299
+
300
+ export function MLBGameFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBGame {
301
+ if (json == null) {
302
+ return json;
303
+ }
304
+ return {
305
+
306
+ 'gamePk': json['gamePk'],
307
+ 'gameGuid': json['gameGuid'],
308
+ 'link': json['link'] == null ? undefined : json['link'],
309
+ 'gameType': json['gameType'],
310
+ 'season': json['season'],
311
+ 'gameDate': json['gameDate'],
312
+ 'officialDate': json['officialDate'],
313
+ 'rescheduledTo': json['rescheduledTo'] == null ? undefined : json['rescheduledTo'],
314
+ 'rescheduledToDate': json['rescheduledToDate'] == null ? undefined : json['rescheduledToDate'],
315
+ 'rescheduledFrom': json['rescheduledFrom'] == null ? undefined : json['rescheduledFrom'],
316
+ 'rescheduledFromDate': json['rescheduledFromDate'] == null ? undefined : json['rescheduledFromDate'],
317
+ 'status': MLBGameStatusFromJSON(json['status']),
318
+ 'teams': MLBGameTeamsFromJSON(json['teams']),
319
+ 'venue': json['venue'] == null ? undefined : MLBVenueFromJSON(json['venue']),
320
+ 'content': json['content'] == null ? undefined : MLBGameContentFromJSON(json['content']),
321
+ 'isTie': json['isTie'] == null ? undefined : json['isTie'],
322
+ 'gameNumber': json['gameNumber'],
323
+ 'publicFacing': json['publicFacing'] == null ? undefined : json['publicFacing'],
324
+ 'doubleHeader': json['doubleHeader'] == null ? undefined : json['doubleHeader'],
325
+ 'gamedayType': json['gamedayType'] == null ? undefined : json['gamedayType'],
326
+ 'tiebreaker': json['tiebreaker'] == null ? undefined : json['tiebreaker'],
327
+ 'calendarEventID': json['calendarEventID'] == null ? undefined : json['calendarEventID'],
328
+ 'seasonDisplay': json['seasonDisplay'] == null ? undefined : json['seasonDisplay'],
329
+ 'dayNight': json['dayNight'] == null ? undefined : json['dayNight'],
330
+ 'description': json['description'] == null ? undefined : json['description'],
331
+ 'scheduledInnings': json['scheduledInnings'] == null ? undefined : json['scheduledInnings'],
332
+ 'reverseHomeAwayStatus': json['reverseHomeAwayStatus'] == null ? undefined : json['reverseHomeAwayStatus'],
333
+ 'inningBreakLength': json['inningBreakLength'] == null ? undefined : json['inningBreakLength'],
334
+ 'gamesInSeries': json['gamesInSeries'],
335
+ 'seriesGameNumber': json['seriesGameNumber'],
336
+ 'seriesDescription': json['seriesDescription'] == null ? undefined : json['seriesDescription'],
337
+ 'recordSource': json['recordSource'] == null ? undefined : json['recordSource'],
338
+ 'ifNecessary': json['ifNecessary'] == null ? undefined : json['ifNecessary'],
339
+ 'ifNecessaryDescription': json['ifNecessaryDescription'] == null ? undefined : json['ifNecessaryDescription'],
340
+ };
341
+ }
342
+
343
+ export function MLBGameToJSON(value?: MLBGame | null): any {
344
+ if (value == null) {
345
+ return value;
346
+ }
347
+ return {
348
+
349
+ 'gamePk': value['gamePk'],
350
+ 'gameGuid': value['gameGuid'],
351
+ 'link': value['link'],
352
+ 'gameType': value['gameType'],
353
+ 'season': value['season'],
354
+ 'gameDate': value['gameDate'],
355
+ 'officialDate': value['officialDate'],
356
+ 'rescheduledTo': value['rescheduledTo'],
357
+ 'rescheduledToDate': value['rescheduledToDate'],
358
+ 'rescheduledFrom': value['rescheduledFrom'],
359
+ 'rescheduledFromDate': value['rescheduledFromDate'],
360
+ 'status': MLBGameStatusToJSON(value['status']),
361
+ 'teams': MLBGameTeamsToJSON(value['teams']),
362
+ 'venue': MLBVenueToJSON(value['venue']),
363
+ 'content': MLBGameContentToJSON(value['content']),
364
+ 'isTie': value['isTie'],
365
+ 'gameNumber': value['gameNumber'],
366
+ 'publicFacing': value['publicFacing'],
367
+ 'doubleHeader': value['doubleHeader'],
368
+ 'gamedayType': value['gamedayType'],
369
+ 'tiebreaker': value['tiebreaker'],
370
+ 'calendarEventID': value['calendarEventID'],
371
+ 'seasonDisplay': value['seasonDisplay'],
372
+ 'dayNight': value['dayNight'],
373
+ 'description': value['description'],
374
+ 'scheduledInnings': value['scheduledInnings'],
375
+ 'reverseHomeAwayStatus': value['reverseHomeAwayStatus'],
376
+ 'inningBreakLength': value['inningBreakLength'],
377
+ 'gamesInSeries': value['gamesInSeries'],
378
+ 'seriesGameNumber': value['seriesGameNumber'],
379
+ 'seriesDescription': value['seriesDescription'],
380
+ 'recordSource': value['recordSource'],
381
+ 'ifNecessary': value['ifNecessary'],
382
+ 'ifNecessaryDescription': value['ifNecessaryDescription'],
383
+ };
384
+ }
385
+
@@ -0,0 +1,60 @@
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.0.1
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 MLBGameContent
20
+ */
21
+ export interface MLBGameContent {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof MLBGameContent
26
+ */
27
+ link?: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the MLBGameContent interface.
32
+ */
33
+ export function instanceOfMLBGameContent(value: object): value is MLBGameContent {
34
+ return true;
35
+ }
36
+
37
+ export function MLBGameContentFromJSON(json: any): MLBGameContent {
38
+ return MLBGameContentFromJSONTyped(json, false);
39
+ }
40
+
41
+ export function MLBGameContentFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBGameContent {
42
+ if (json == null) {
43
+ return json;
44
+ }
45
+ return {
46
+
47
+ 'link': json['link'] == null ? undefined : json['link'],
48
+ };
49
+ }
50
+
51
+ export function MLBGameContentToJSON(value?: MLBGameContent | null): any {
52
+ if (value == null) {
53
+ return value;
54
+ }
55
+ return {
56
+
57
+ 'link': value['link'],
58
+ };
59
+ }
60
+
@@ -0,0 +1,122 @@
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.0.1
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
+
@@ -0,0 +1,117 @@
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.0.1
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 { MLBTeamRecord } from './MLBTeamRecord';
17
+ import {
18
+ MLBTeamRecordFromJSON,
19
+ MLBTeamRecordFromJSONTyped,
20
+ MLBTeamRecordToJSON,
21
+ } from './MLBTeamRecord';
22
+ import type { MLBTeam } from './MLBTeam';
23
+ import {
24
+ MLBTeamFromJSON,
25
+ MLBTeamFromJSONTyped,
26
+ MLBTeamToJSON,
27
+ } from './MLBTeam';
28
+
29
+ /**
30
+ * Game Team
31
+ *
32
+ * @export
33
+ * @interface MLBGameTeam
34
+ */
35
+ export interface MLBGameTeam {
36
+ /**
37
+ *
38
+ * @type {MLBTeamRecord}
39
+ * @memberof MLBGameTeam
40
+ */
41
+ leagueRecord?: MLBTeamRecord;
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 : MLBTeamRecordFromJSON(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': MLBTeamRecordToJSON(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
+