@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,337 @@
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 { MLBStreak } from './MLBStreak';
17
+ import {
18
+ MLBStreakFromJSON,
19
+ MLBStreakFromJSONTyped,
20
+ MLBStreakToJSON,
21
+ } from './MLBStreak';
22
+ import type { MLBTeamRecord1 } from './MLBTeamRecord1';
23
+ import {
24
+ MLBTeamRecord1FromJSON,
25
+ MLBTeamRecord1FromJSONTyped,
26
+ MLBTeamRecord1ToJSON,
27
+ } from './MLBTeamRecord1';
28
+ import type { Team } from './Team';
29
+ import {
30
+ TeamFromJSON,
31
+ TeamFromJSONTyped,
32
+ TeamToJSON,
33
+ } from './Team';
34
+
35
+ /**
36
+ * Record
37
+ *
38
+ * @export
39
+ * @interface Record
40
+ */
41
+ export interface Record {
42
+ /**
43
+ *
44
+ * @type {Team}
45
+ * @memberof Record
46
+ */
47
+ team: Team;
48
+ /**
49
+ *
50
+ * @type {string}
51
+ * @memberof Record
52
+ */
53
+ season: string;
54
+ /**
55
+ *
56
+ * @type {MLBStreak}
57
+ * @memberof Record
58
+ */
59
+ streak: MLBStreak;
60
+ /**
61
+ *
62
+ * @type {string}
63
+ * @memberof Record
64
+ */
65
+ divisionRank: string;
66
+ /**
67
+ *
68
+ * @type {string}
69
+ * @memberof Record
70
+ */
71
+ leagueRank: string;
72
+ /**
73
+ *
74
+ * @type {string}
75
+ * @memberof Record
76
+ */
77
+ sportRank?: string;
78
+ /**
79
+ *
80
+ * @type {number}
81
+ * @memberof Record
82
+ */
83
+ gamesPlayed?: number;
84
+ /**
85
+ *
86
+ * @type {string}
87
+ * @memberof Record
88
+ */
89
+ gamesBack: string;
90
+ /**
91
+ *
92
+ * @type {string}
93
+ * @memberof Record
94
+ */
95
+ wildCardGamesBack?: string;
96
+ /**
97
+ *
98
+ * @type {string}
99
+ * @memberof Record
100
+ */
101
+ leagueGamesBack?: string;
102
+ /**
103
+ *
104
+ * @type {string}
105
+ * @memberof Record
106
+ */
107
+ sportGamesBack?: string;
108
+ /**
109
+ *
110
+ * @type {string}
111
+ * @memberof Record
112
+ */
113
+ divisionGamesBack?: string;
114
+ /**
115
+ *
116
+ * @type {string}
117
+ * @memberof Record
118
+ */
119
+ conferenceGamesBack?: string;
120
+ /**
121
+ *
122
+ * @type {MLBTeamRecord1}
123
+ * @memberof Record
124
+ */
125
+ leagueRecord: MLBTeamRecord1;
126
+ /**
127
+ *
128
+ * @type {string}
129
+ * @memberof Record
130
+ */
131
+ lastUpdated?: string;
132
+ /**
133
+ *
134
+ * @type {number}
135
+ * @memberof Record
136
+ */
137
+ runsAllowed?: number;
138
+ /**
139
+ *
140
+ * @type {number}
141
+ * @memberof Record
142
+ */
143
+ runsScored?: number;
144
+ /**
145
+ *
146
+ * @type {boolean}
147
+ * @memberof Record
148
+ */
149
+ divisionChamp?: boolean;
150
+ /**
151
+ *
152
+ * @type {boolean}
153
+ * @memberof Record
154
+ */
155
+ divisionLeader?: boolean;
156
+ /**
157
+ *
158
+ * @type {boolean}
159
+ * @memberof Record
160
+ */
161
+ hasWildcard?: boolean;
162
+ /**
163
+ *
164
+ * @type {boolean}
165
+ * @memberof Record
166
+ */
167
+ clinched?: boolean;
168
+ /**
169
+ *
170
+ * @type {string}
171
+ * @memberof Record
172
+ */
173
+ eliminationNumber?: string;
174
+ /**
175
+ *
176
+ * @type {string}
177
+ * @memberof Record
178
+ */
179
+ eliminationNumberSport?: string;
180
+ /**
181
+ *
182
+ * @type {string}
183
+ * @memberof Record
184
+ */
185
+ eliminationNumberLeague?: string;
186
+ /**
187
+ *
188
+ * @type {string}
189
+ * @memberof Record
190
+ */
191
+ eliminationNumberDivision?: string;
192
+ /**
193
+ *
194
+ * @type {string}
195
+ * @memberof Record
196
+ */
197
+ eliminationNumberConference?: string;
198
+ /**
199
+ *
200
+ * @type {string}
201
+ * @memberof Record
202
+ */
203
+ wildCardEliminationNumber?: string;
204
+ /**
205
+ *
206
+ * @type {string}
207
+ * @memberof Record
208
+ */
209
+ magicNumber?: string;
210
+ /**
211
+ *
212
+ * @type {number}
213
+ * @memberof Record
214
+ */
215
+ wins: number;
216
+ /**
217
+ *
218
+ * @type {number}
219
+ * @memberof Record
220
+ */
221
+ losses: number;
222
+ /**
223
+ *
224
+ * @type {number}
225
+ * @memberof Record
226
+ */
227
+ runDifferential?: number;
228
+ /**
229
+ *
230
+ * @type {string}
231
+ * @memberof Record
232
+ */
233
+ winningPercentage?: string;
234
+ }
235
+
236
+ /**
237
+ * Check if a given object implements the Record interface.
238
+ */
239
+ export function instanceOfRecord(value: object): value is Record {
240
+ if (!('team' in value) || value['team'] === undefined) return false;
241
+ if (!('season' in value) || value['season'] === undefined) return false;
242
+ if (!('streak' in value) || value['streak'] === undefined) return false;
243
+ if (!('divisionRank' in value) || value['divisionRank'] === undefined) return false;
244
+ if (!('leagueRank' in value) || value['leagueRank'] === undefined) return false;
245
+ if (!('gamesBack' in value) || value['gamesBack'] === undefined) return false;
246
+ if (!('leagueRecord' in value) || value['leagueRecord'] === undefined) return false;
247
+ if (!('wins' in value) || value['wins'] === undefined) return false;
248
+ if (!('losses' in value) || value['losses'] === undefined) return false;
249
+ return true;
250
+ }
251
+
252
+ export function RecordFromJSON(json: any): Record {
253
+ return RecordFromJSONTyped(json, false);
254
+ }
255
+
256
+ export function RecordFromJSONTyped(json: any, ignoreDiscriminator: boolean): Record {
257
+ if (json == null) {
258
+ return json;
259
+ }
260
+ return {
261
+
262
+ 'team': TeamFromJSON(json['team']),
263
+ 'season': json['season'],
264
+ 'streak': MLBStreakFromJSON(json['streak']),
265
+ 'divisionRank': json['divisionRank'],
266
+ 'leagueRank': json['leagueRank'],
267
+ 'sportRank': json['sportRank'] == null ? undefined : json['sportRank'],
268
+ 'gamesPlayed': json['gamesPlayed'] == null ? undefined : json['gamesPlayed'],
269
+ 'gamesBack': json['gamesBack'],
270
+ 'wildCardGamesBack': json['wildCardGamesBack'] == null ? undefined : json['wildCardGamesBack'],
271
+ 'leagueGamesBack': json['leagueGamesBack'] == null ? undefined : json['leagueGamesBack'],
272
+ 'sportGamesBack': json['sportGamesBack'] == null ? undefined : json['sportGamesBack'],
273
+ 'divisionGamesBack': json['divisionGamesBack'] == null ? undefined : json['divisionGamesBack'],
274
+ 'conferenceGamesBack': json['conferenceGamesBack'] == null ? undefined : json['conferenceGamesBack'],
275
+ 'leagueRecord': MLBTeamRecord1FromJSON(json['leagueRecord']),
276
+ 'lastUpdated': json['lastUpdated'] == null ? undefined : json['lastUpdated'],
277
+ 'runsAllowed': json['runsAllowed'] == null ? undefined : json['runsAllowed'],
278
+ 'runsScored': json['runsScored'] == null ? undefined : json['runsScored'],
279
+ 'divisionChamp': json['divisionChamp'] == null ? undefined : json['divisionChamp'],
280
+ 'divisionLeader': json['divisionLeader'] == null ? undefined : json['divisionLeader'],
281
+ 'hasWildcard': json['hasWildcard'] == null ? undefined : json['hasWildcard'],
282
+ 'clinched': json['clinched'] == null ? undefined : json['clinched'],
283
+ 'eliminationNumber': json['eliminationNumber'] == null ? undefined : json['eliminationNumber'],
284
+ 'eliminationNumberSport': json['eliminationNumberSport'] == null ? undefined : json['eliminationNumberSport'],
285
+ 'eliminationNumberLeague': json['eliminationNumberLeague'] == null ? undefined : json['eliminationNumberLeague'],
286
+ 'eliminationNumberDivision': json['eliminationNumberDivision'] == null ? undefined : json['eliminationNumberDivision'],
287
+ 'eliminationNumberConference': json['eliminationNumberConference'] == null ? undefined : json['eliminationNumberConference'],
288
+ 'wildCardEliminationNumber': json['wildCardEliminationNumber'] == null ? undefined : json['wildCardEliminationNumber'],
289
+ 'magicNumber': json['magicNumber'] == null ? undefined : json['magicNumber'],
290
+ 'wins': json['wins'],
291
+ 'losses': json['losses'],
292
+ 'runDifferential': json['runDifferential'] == null ? undefined : json['runDifferential'],
293
+ 'winningPercentage': json['winningPercentage'] == null ? undefined : json['winningPercentage'],
294
+ };
295
+ }
296
+
297
+ export function RecordToJSON(value?: Record | null): any {
298
+ if (value == null) {
299
+ return value;
300
+ }
301
+ return {
302
+
303
+ 'team': TeamToJSON(value['team']),
304
+ 'season': value['season'],
305
+ 'streak': MLBStreakToJSON(value['streak']),
306
+ 'divisionRank': value['divisionRank'],
307
+ 'leagueRank': value['leagueRank'],
308
+ 'sportRank': value['sportRank'],
309
+ 'gamesPlayed': value['gamesPlayed'],
310
+ 'gamesBack': value['gamesBack'],
311
+ 'wildCardGamesBack': value['wildCardGamesBack'],
312
+ 'leagueGamesBack': value['leagueGamesBack'],
313
+ 'sportGamesBack': value['sportGamesBack'],
314
+ 'divisionGamesBack': value['divisionGamesBack'],
315
+ 'conferenceGamesBack': value['conferenceGamesBack'],
316
+ 'leagueRecord': MLBTeamRecord1ToJSON(value['leagueRecord']),
317
+ 'lastUpdated': value['lastUpdated'],
318
+ 'runsAllowed': value['runsAllowed'],
319
+ 'runsScored': value['runsScored'],
320
+ 'divisionChamp': value['divisionChamp'],
321
+ 'divisionLeader': value['divisionLeader'],
322
+ 'hasWildcard': value['hasWildcard'],
323
+ 'clinched': value['clinched'],
324
+ 'eliminationNumber': value['eliminationNumber'],
325
+ 'eliminationNumberSport': value['eliminationNumberSport'],
326
+ 'eliminationNumberLeague': value['eliminationNumberLeague'],
327
+ 'eliminationNumberDivision': value['eliminationNumberDivision'],
328
+ 'eliminationNumberConference': value['eliminationNumberConference'],
329
+ 'wildCardEliminationNumber': value['wildCardEliminationNumber'],
330
+ 'magicNumber': value['magicNumber'],
331
+ 'wins': value['wins'],
332
+ 'losses': value['losses'],
333
+ 'runDifferential': value['runDifferential'],
334
+ 'winningPercentage': value['winningPercentage'],
335
+ };
336
+ }
337
+
@@ -0,0 +1,105 @@
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 { MLBScheduleDay } from './MLBScheduleDay';
17
+ import {
18
+ MLBScheduleDayFromJSON,
19
+ MLBScheduleDayFromJSONTyped,
20
+ MLBScheduleDayToJSON,
21
+ } from './MLBScheduleDay';
22
+
23
+ /**
24
+ * Schedule
25
+ *
26
+ * @export
27
+ * @interface Schedule
28
+ */
29
+ export interface Schedule {
30
+ /**
31
+ *
32
+ * @type {number}
33
+ * @memberof Schedule
34
+ */
35
+ totalItems: number;
36
+ /**
37
+ *
38
+ * @type {number}
39
+ * @memberof Schedule
40
+ */
41
+ totalEvents: number;
42
+ /**
43
+ *
44
+ * @type {number}
45
+ * @memberof Schedule
46
+ */
47
+ totalGames: number;
48
+ /**
49
+ *
50
+ * @type {number}
51
+ * @memberof Schedule
52
+ */
53
+ totalGamesInProgress: number;
54
+ /**
55
+ *
56
+ * @type {Array<MLBScheduleDay>}
57
+ * @memberof Schedule
58
+ */
59
+ dates: Array<MLBScheduleDay>;
60
+ }
61
+
62
+ /**
63
+ * Check if a given object implements the Schedule interface.
64
+ */
65
+ export function instanceOfSchedule(value: object): value is Schedule {
66
+ if (!('totalItems' in value) || value['totalItems'] === undefined) return false;
67
+ if (!('totalEvents' in value) || value['totalEvents'] === undefined) return false;
68
+ if (!('totalGames' in value) || value['totalGames'] === undefined) return false;
69
+ if (!('totalGamesInProgress' in value) || value['totalGamesInProgress'] === undefined) return false;
70
+ if (!('dates' in value) || value['dates'] === undefined) return false;
71
+ return true;
72
+ }
73
+
74
+ export function ScheduleFromJSON(json: any): Schedule {
75
+ return ScheduleFromJSONTyped(json, false);
76
+ }
77
+
78
+ export function ScheduleFromJSONTyped(json: any, ignoreDiscriminator: boolean): Schedule {
79
+ if (json == null) {
80
+ return json;
81
+ }
82
+ return {
83
+
84
+ 'totalItems': json['totalItems'],
85
+ 'totalEvents': json['totalEvents'],
86
+ 'totalGames': json['totalGames'],
87
+ 'totalGamesInProgress': json['totalGamesInProgress'],
88
+ 'dates': ((json['dates'] as Array<any>).map(MLBScheduleDayFromJSON)),
89
+ };
90
+ }
91
+
92
+ export function ScheduleToJSON(value?: Schedule | null): any {
93
+ if (value == null) {
94
+ return value;
95
+ }
96
+ return {
97
+
98
+ 'totalItems': value['totalItems'],
99
+ 'totalEvents': value['totalEvents'],
100
+ 'totalGames': value['totalGames'],
101
+ 'totalGamesInProgress': value['totalGamesInProgress'],
102
+ 'dates': ((value['dates'] as Array<any>).map(MLBScheduleDayToJSON)),
103
+ };
104
+ }
105
+
@@ -0,0 +1,226 @@
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
+ * Season
18
+ *
19
+ * @export
20
+ * @interface Season
21
+ */
22
+ export interface Season {
23
+ /**
24
+ *
25
+ * @type {string}
26
+ * @memberof Season
27
+ */
28
+ seasonId: string;
29
+ /**
30
+ *
31
+ * @type {boolean}
32
+ * @memberof Season
33
+ */
34
+ hasWildcard?: boolean;
35
+ /**
36
+ *
37
+ * @type {string}
38
+ * @memberof Season
39
+ */
40
+ preSeasonStartDate?: string;
41
+ /**
42
+ *
43
+ * @type {string}
44
+ * @memberof Season
45
+ */
46
+ preSeasonEndDate?: string;
47
+ /**
48
+ *
49
+ * @type {string}
50
+ * @memberof Season
51
+ */
52
+ seasonStartDate: string;
53
+ /**
54
+ *
55
+ * @type {string}
56
+ * @memberof Season
57
+ */
58
+ seasonEndDate: string;
59
+ /**
60
+ *
61
+ * @type {string}
62
+ * @memberof Season
63
+ */
64
+ springStartDate?: string;
65
+ /**
66
+ *
67
+ * @type {string}
68
+ * @memberof Season
69
+ */
70
+ springEndDate?: string;
71
+ /**
72
+ *
73
+ * @type {string}
74
+ * @memberof Season
75
+ */
76
+ regularSeasonStartDate: string;
77
+ /**
78
+ *
79
+ * @type {string}
80
+ * @memberof Season
81
+ */
82
+ lastDate1stHalf?: string;
83
+ /**
84
+ *
85
+ * @type {string}
86
+ * @memberof Season
87
+ */
88
+ allStartDate?: string;
89
+ /**
90
+ *
91
+ * @type {string}
92
+ * @memberof Season
93
+ */
94
+ firstDate2ndHalf?: string;
95
+ /**
96
+ *
97
+ * @type {string}
98
+ * @memberof Season
99
+ */
100
+ regularSeasonEndDate: string;
101
+ /**
102
+ *
103
+ * @type {string}
104
+ * @memberof Season
105
+ */
106
+ postSeasonStartDate?: string;
107
+ /**
108
+ *
109
+ * @type {string}
110
+ * @memberof Season
111
+ */
112
+ postSeasonEndDate?: string;
113
+ /**
114
+ *
115
+ * @type {string}
116
+ * @memberof Season
117
+ */
118
+ offSeasonStartDate?: string;
119
+ /**
120
+ *
121
+ * @type {string}
122
+ * @memberof Season
123
+ */
124
+ offSeasonEndDate?: string;
125
+ /**
126
+ *
127
+ * @type {string}
128
+ * @memberof Season
129
+ */
130
+ seasonLevelGamedayType?: string;
131
+ /**
132
+ *
133
+ * @type {string}
134
+ * @memberof Season
135
+ */
136
+ gameLevelGamedayType?: string;
137
+ /**
138
+ *
139
+ * @type {number}
140
+ * @memberof Season
141
+ */
142
+ qualifierPlateAppearances?: number;
143
+ /**
144
+ *
145
+ * @type {number}
146
+ * @memberof Season
147
+ */
148
+ qualifierOutsPitched?: number;
149
+ }
150
+
151
+ /**
152
+ * Check if a given object implements the Season interface.
153
+ */
154
+ export function instanceOfSeason(value: object): value is Season {
155
+ if (!('seasonId' in value) || value['seasonId'] === undefined) return false;
156
+ if (!('seasonStartDate' in value) || value['seasonStartDate'] === undefined) return false;
157
+ if (!('seasonEndDate' in value) || value['seasonEndDate'] === undefined) return false;
158
+ if (!('regularSeasonStartDate' in value) || value['regularSeasonStartDate'] === undefined) return false;
159
+ if (!('regularSeasonEndDate' in value) || value['regularSeasonEndDate'] === undefined) return false;
160
+ return true;
161
+ }
162
+
163
+ export function SeasonFromJSON(json: any): Season {
164
+ return SeasonFromJSONTyped(json, false);
165
+ }
166
+
167
+ export function SeasonFromJSONTyped(json: any, ignoreDiscriminator: boolean): Season {
168
+ if (json == null) {
169
+ return json;
170
+ }
171
+ return {
172
+
173
+ 'seasonId': json['seasonId'],
174
+ 'hasWildcard': json['hasWildcard'] == null ? undefined : json['hasWildcard'],
175
+ 'preSeasonStartDate': json['preSeasonStartDate'] == null ? undefined : json['preSeasonStartDate'],
176
+ 'preSeasonEndDate': json['preSeasonEndDate'] == null ? undefined : json['preSeasonEndDate'],
177
+ 'seasonStartDate': json['seasonStartDate'],
178
+ 'seasonEndDate': json['seasonEndDate'],
179
+ 'springStartDate': json['springStartDate'] == null ? undefined : json['springStartDate'],
180
+ 'springEndDate': json['springEndDate'] == null ? undefined : json['springEndDate'],
181
+ 'regularSeasonStartDate': json['regularSeasonStartDate'],
182
+ 'lastDate1stHalf': json['lastDate1stHalf'] == null ? undefined : json['lastDate1stHalf'],
183
+ 'allStartDate': json['allStartDate'] == null ? undefined : json['allStartDate'],
184
+ 'firstDate2ndHalf': json['firstDate2ndHalf'] == null ? undefined : json['firstDate2ndHalf'],
185
+ 'regularSeasonEndDate': json['regularSeasonEndDate'],
186
+ 'postSeasonStartDate': json['postSeasonStartDate'] == null ? undefined : json['postSeasonStartDate'],
187
+ 'postSeasonEndDate': json['postSeasonEndDate'] == null ? undefined : json['postSeasonEndDate'],
188
+ 'offSeasonStartDate': json['offSeasonStartDate'] == null ? undefined : json['offSeasonStartDate'],
189
+ 'offSeasonEndDate': json['offSeasonEndDate'] == null ? undefined : json['offSeasonEndDate'],
190
+ 'seasonLevelGamedayType': json['seasonLevelGamedayType'] == null ? undefined : json['seasonLevelGamedayType'],
191
+ 'gameLevelGamedayType': json['gameLevelGamedayType'] == null ? undefined : json['gameLevelGamedayType'],
192
+ 'qualifierPlateAppearances': json['qualifierPlateAppearances'] == null ? undefined : json['qualifierPlateAppearances'],
193
+ 'qualifierOutsPitched': json['qualifierOutsPitched'] == null ? undefined : json['qualifierOutsPitched'],
194
+ };
195
+ }
196
+
197
+ export function SeasonToJSON(value?: Season | null): any {
198
+ if (value == null) {
199
+ return value;
200
+ }
201
+ return {
202
+
203
+ 'seasonId': value['seasonId'],
204
+ 'hasWildcard': value['hasWildcard'],
205
+ 'preSeasonStartDate': value['preSeasonStartDate'],
206
+ 'preSeasonEndDate': value['preSeasonEndDate'],
207
+ 'seasonStartDate': value['seasonStartDate'],
208
+ 'seasonEndDate': value['seasonEndDate'],
209
+ 'springStartDate': value['springStartDate'],
210
+ 'springEndDate': value['springEndDate'],
211
+ 'regularSeasonStartDate': value['regularSeasonStartDate'],
212
+ 'lastDate1stHalf': value['lastDate1stHalf'],
213
+ 'allStartDate': value['allStartDate'],
214
+ 'firstDate2ndHalf': value['firstDate2ndHalf'],
215
+ 'regularSeasonEndDate': value['regularSeasonEndDate'],
216
+ 'postSeasonStartDate': value['postSeasonStartDate'],
217
+ 'postSeasonEndDate': value['postSeasonEndDate'],
218
+ 'offSeasonStartDate': value['offSeasonStartDate'],
219
+ 'offSeasonEndDate': value['offSeasonEndDate'],
220
+ 'seasonLevelGamedayType': value['seasonLevelGamedayType'],
221
+ 'gameLevelGamedayType': value['gameLevelGamedayType'],
222
+ 'qualifierPlateAppearances': value['qualifierPlateAppearances'],
223
+ 'qualifierOutsPitched': value['qualifierOutsPitched'],
224
+ };
225
+ }
226
+