@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.
- package/Makefile +26 -0
- package/openapitools.json +14 -0
- package/package.json +20 -0
- package/spec/components/parameters/parameters.yaml +21 -0
- package/spec/components/parameters/query/date.yaml +5 -0
- package/spec/components/parameters/query/endDate.yaml +5 -0
- package/spec/components/parameters/query/eventTypes.yaml +5 -0
- package/spec/components/parameters/query/fields.yaml +10 -0
- package/spec/components/parameters/query/gamePks.yaml +5 -0
- package/spec/components/parameters/query/gameTypes.yaml +5 -0
- package/spec/components/parameters/query/hydrate.yaml +5 -0
- package/spec/components/parameters/query/leagueId.yaml +5 -0
- package/spec/components/parameters/query/leagueIds.yaml +7 -0
- package/spec/components/parameters/query/opponentId.yaml +5 -0
- package/spec/components/parameters/query/scheduleType.yaml +5 -0
- package/spec/components/parameters/query/season.yaml +5 -0
- package/spec/components/parameters/query/sportId.yaml +6 -0
- package/spec/components/parameters/query/startDate.yaml +5 -0
- package/spec/components/parameters/query/teamId.yaml +5 -0
- package/spec/components/parameters/query/venueIds.yaml +5 -0
- package/spec/components/schemas/division.yaml +32 -0
- package/spec/components/schemas/game.yaml +157 -0
- package/spec/components/schemas/gameTeam.yaml +30 -0
- package/spec/components/schemas/league.yaml +62 -0
- package/spec/components/schemas/record.yaml +110 -0
- package/spec/components/schemas/schedule.yaml +41 -0
- package/spec/components/schemas/schemas.yaml +22 -0
- package/spec/components/schemas/season.yaml +53 -0
- package/spec/components/schemas/sport.yaml +21 -0
- package/spec/components/schemas/standings.yaml +24 -0
- package/spec/components/schemas/team.yaml +50 -0
- package/spec/components/schemas/venue.yaml +18 -0
- package/spec/openapi.yaml +32 -0
- package/spec/paths/allSeasons.yaml +23 -0
- package/spec/paths/schedule.yaml +20 -0
- package/spec/paths/season.yaml +18 -0
- package/spec/paths/standings.yaml +27 -0
- package/spec/paths/teams.yaml +33 -0
- package/src/.openapi-generator/FILES +27 -0
- package/src/.openapi-generator/VERSION +1 -0
- package/src/.openapi-generator-ignore +23 -0
- package/src/apis/MlbApi.ts +328 -0
- package/src/apis/index.ts +3 -0
- package/src/index.ts +5 -0
- package/src/models/Division.ts +164 -0
- package/src/models/Game.ts +385 -0
- package/src/models/GameContent.ts +60 -0
- package/src/models/GameTeam.ts +117 -0
- package/src/models/GameTeams.ts +77 -0
- package/src/models/League.ts +190 -0
- package/src/models/MLBDivision.ts +164 -0
- package/src/models/MLBGame.ts +385 -0
- package/src/models/MLBGameContent.ts +60 -0
- package/src/models/MLBGameStatus.ts +122 -0
- package/src/models/MLBGameTeam.ts +117 -0
- package/src/models/MLBGameTeams.ts +77 -0
- package/src/models/MLBLeague.ts +190 -0
- package/src/models/MLBLeagueDates.ts +132 -0
- package/src/models/MLBRecord.ts +337 -0
- package/src/models/MLBSchedule.ts +105 -0
- package/src/models/MLBScheduleDay.ts +108 -0
- package/src/models/MLBSeason.ts +226 -0
- package/src/models/MLBSeasons.ts +67 -0
- package/src/models/MLBSport.ts +110 -0
- package/src/models/MLBStandings.ts +130 -0
- package/src/models/MLBStandingsList.ts +67 -0
- package/src/models/MLBStreak.ts +74 -0
- package/src/models/MLBTeam.ts +248 -0
- package/src/models/MLBTeamRecord.ts +76 -0
- package/src/models/MLBTeamRecord1.ts +88 -0
- package/src/models/MLBTeams.ts +67 -0
- package/src/models/MLBVenue.ts +95 -0
- package/src/models/Record.ts +337 -0
- package/src/models/Schedule.ts +105 -0
- package/src/models/Season.ts +226 -0
- package/src/models/Sport.ts +110 -0
- package/src/models/Standings.ts +130 -0
- package/src/models/Team.ts +248 -0
- package/src/models/Venue.ts +95 -0
- package/src/models/index.ts +24 -0
- package/src/runtime.ts +426 -0
- package/tsconfig.json +108 -0
|
@@ -0,0 +1,248 @@
|
|
|
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 { MLBDivision } from './MLBDivision';
|
|
17
|
+
import {
|
|
18
|
+
MLBDivisionFromJSON,
|
|
19
|
+
MLBDivisionFromJSONTyped,
|
|
20
|
+
MLBDivisionToJSON,
|
|
21
|
+
} from './MLBDivision';
|
|
22
|
+
import type { MLBVenue } from './MLBVenue';
|
|
23
|
+
import {
|
|
24
|
+
MLBVenueFromJSON,
|
|
25
|
+
MLBVenueFromJSONTyped,
|
|
26
|
+
MLBVenueToJSON,
|
|
27
|
+
} from './MLBVenue';
|
|
28
|
+
import type { MLBLeague } from './MLBLeague';
|
|
29
|
+
import {
|
|
30
|
+
MLBLeagueFromJSON,
|
|
31
|
+
MLBLeagueFromJSONTyped,
|
|
32
|
+
MLBLeagueToJSON,
|
|
33
|
+
} from './MLBLeague';
|
|
34
|
+
import type { MLBSport } from './MLBSport';
|
|
35
|
+
import {
|
|
36
|
+
MLBSportFromJSON,
|
|
37
|
+
MLBSportFromJSONTyped,
|
|
38
|
+
MLBSportToJSON,
|
|
39
|
+
} from './MLBSport';
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Team
|
|
43
|
+
*
|
|
44
|
+
* @export
|
|
45
|
+
* @interface MLBTeam
|
|
46
|
+
*/
|
|
47
|
+
export interface MLBTeam {
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {number}
|
|
51
|
+
* @memberof MLBTeam
|
|
52
|
+
*/
|
|
53
|
+
id: number;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof MLBTeam
|
|
58
|
+
*/
|
|
59
|
+
name: string;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {string}
|
|
63
|
+
* @memberof MLBTeam
|
|
64
|
+
*/
|
|
65
|
+
link?: string;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @type {string}
|
|
69
|
+
* @memberof MLBTeam
|
|
70
|
+
*/
|
|
71
|
+
allStarStatus?: string;
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @type {number}
|
|
75
|
+
* @memberof MLBTeam
|
|
76
|
+
*/
|
|
77
|
+
season?: number;
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
* @type {MLBVenue}
|
|
81
|
+
* @memberof MLBTeam
|
|
82
|
+
*/
|
|
83
|
+
venue?: MLBVenue;
|
|
84
|
+
/**
|
|
85
|
+
*
|
|
86
|
+
* @type {MLBVenue}
|
|
87
|
+
* @memberof MLBTeam
|
|
88
|
+
*/
|
|
89
|
+
springVenue?: MLBVenue;
|
|
90
|
+
/**
|
|
91
|
+
*
|
|
92
|
+
* @type {string}
|
|
93
|
+
* @memberof MLBTeam
|
|
94
|
+
*/
|
|
95
|
+
teamCode?: string;
|
|
96
|
+
/**
|
|
97
|
+
*
|
|
98
|
+
* @type {string}
|
|
99
|
+
* @memberof MLBTeam
|
|
100
|
+
*/
|
|
101
|
+
fileCode?: string;
|
|
102
|
+
/**
|
|
103
|
+
*
|
|
104
|
+
* @type {string}
|
|
105
|
+
* @memberof MLBTeam
|
|
106
|
+
*/
|
|
107
|
+
abbreviation?: string;
|
|
108
|
+
/**
|
|
109
|
+
*
|
|
110
|
+
* @type {string}
|
|
111
|
+
* @memberof MLBTeam
|
|
112
|
+
*/
|
|
113
|
+
teamName?: string;
|
|
114
|
+
/**
|
|
115
|
+
*
|
|
116
|
+
* @type {string}
|
|
117
|
+
* @memberof MLBTeam
|
|
118
|
+
*/
|
|
119
|
+
locationName?: string;
|
|
120
|
+
/**
|
|
121
|
+
*
|
|
122
|
+
* @type {string}
|
|
123
|
+
* @memberof MLBTeam
|
|
124
|
+
*/
|
|
125
|
+
firstYearOfPlay?: string;
|
|
126
|
+
/**
|
|
127
|
+
*
|
|
128
|
+
* @type {MLBLeague}
|
|
129
|
+
* @memberof MLBTeam
|
|
130
|
+
*/
|
|
131
|
+
league?: MLBLeague;
|
|
132
|
+
/**
|
|
133
|
+
*
|
|
134
|
+
* @type {MLBLeague}
|
|
135
|
+
* @memberof MLBTeam
|
|
136
|
+
*/
|
|
137
|
+
springLeague?: MLBLeague;
|
|
138
|
+
/**
|
|
139
|
+
*
|
|
140
|
+
* @type {MLBDivision}
|
|
141
|
+
* @memberof MLBTeam
|
|
142
|
+
*/
|
|
143
|
+
division?: MLBDivision;
|
|
144
|
+
/**
|
|
145
|
+
*
|
|
146
|
+
* @type {MLBSport}
|
|
147
|
+
* @memberof MLBTeam
|
|
148
|
+
*/
|
|
149
|
+
sport?: MLBSport;
|
|
150
|
+
/**
|
|
151
|
+
*
|
|
152
|
+
* @type {string}
|
|
153
|
+
* @memberof MLBTeam
|
|
154
|
+
*/
|
|
155
|
+
shortName?: string;
|
|
156
|
+
/**
|
|
157
|
+
*
|
|
158
|
+
* @type {string}
|
|
159
|
+
* @memberof MLBTeam
|
|
160
|
+
*/
|
|
161
|
+
franchiseName?: string;
|
|
162
|
+
/**
|
|
163
|
+
*
|
|
164
|
+
* @type {string}
|
|
165
|
+
* @memberof MLBTeam
|
|
166
|
+
*/
|
|
167
|
+
clubName?: string;
|
|
168
|
+
/**
|
|
169
|
+
*
|
|
170
|
+
* @type {boolean}
|
|
171
|
+
* @memberof MLBTeam
|
|
172
|
+
*/
|
|
173
|
+
active?: boolean;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Check if a given object implements the MLBTeam interface.
|
|
178
|
+
*/
|
|
179
|
+
export function instanceOfMLBTeam(value: object): value is MLBTeam {
|
|
180
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
181
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
182
|
+
return true;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export function MLBTeamFromJSON(json: any): MLBTeam {
|
|
186
|
+
return MLBTeamFromJSONTyped(json, false);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export function MLBTeamFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBTeam {
|
|
190
|
+
if (json == null) {
|
|
191
|
+
return json;
|
|
192
|
+
}
|
|
193
|
+
return {
|
|
194
|
+
|
|
195
|
+
'id': json['id'],
|
|
196
|
+
'name': json['name'],
|
|
197
|
+
'link': json['link'] == null ? undefined : json['link'],
|
|
198
|
+
'allStarStatus': json['allStarStatus'] == null ? undefined : json['allStarStatus'],
|
|
199
|
+
'season': json['season'] == null ? undefined : json['season'],
|
|
200
|
+
'venue': json['venue'] == null ? undefined : MLBVenueFromJSON(json['venue']),
|
|
201
|
+
'springVenue': json['springVenue'] == null ? undefined : MLBVenueFromJSON(json['springVenue']),
|
|
202
|
+
'teamCode': json['teamCode'] == null ? undefined : json['teamCode'],
|
|
203
|
+
'fileCode': json['fileCode'] == null ? undefined : json['fileCode'],
|
|
204
|
+
'abbreviation': json['abbreviation'] == null ? undefined : json['abbreviation'],
|
|
205
|
+
'teamName': json['teamName'] == null ? undefined : json['teamName'],
|
|
206
|
+
'locationName': json['locationName'] == null ? undefined : json['locationName'],
|
|
207
|
+
'firstYearOfPlay': json['firstYearOfPlay'] == null ? undefined : json['firstYearOfPlay'],
|
|
208
|
+
'league': json['league'] == null ? undefined : MLBLeagueFromJSON(json['league']),
|
|
209
|
+
'springLeague': json['springLeague'] == null ? undefined : MLBLeagueFromJSON(json['springLeague']),
|
|
210
|
+
'division': json['division'] == null ? undefined : MLBDivisionFromJSON(json['division']),
|
|
211
|
+
'sport': json['sport'] == null ? undefined : MLBSportFromJSON(json['sport']),
|
|
212
|
+
'shortName': json['shortName'] == null ? undefined : json['shortName'],
|
|
213
|
+
'franchiseName': json['franchiseName'] == null ? undefined : json['franchiseName'],
|
|
214
|
+
'clubName': json['clubName'] == null ? undefined : json['clubName'],
|
|
215
|
+
'active': json['active'] == null ? undefined : json['active'],
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export function MLBTeamToJSON(value?: MLBTeam | null): any {
|
|
220
|
+
if (value == null) {
|
|
221
|
+
return value;
|
|
222
|
+
}
|
|
223
|
+
return {
|
|
224
|
+
|
|
225
|
+
'id': value['id'],
|
|
226
|
+
'name': value['name'],
|
|
227
|
+
'link': value['link'],
|
|
228
|
+
'allStarStatus': value['allStarStatus'],
|
|
229
|
+
'season': value['season'],
|
|
230
|
+
'venue': MLBVenueToJSON(value['venue']),
|
|
231
|
+
'springVenue': MLBVenueToJSON(value['springVenue']),
|
|
232
|
+
'teamCode': value['teamCode'],
|
|
233
|
+
'fileCode': value['fileCode'],
|
|
234
|
+
'abbreviation': value['abbreviation'],
|
|
235
|
+
'teamName': value['teamName'],
|
|
236
|
+
'locationName': value['locationName'],
|
|
237
|
+
'firstYearOfPlay': value['firstYearOfPlay'],
|
|
238
|
+
'league': MLBLeagueToJSON(value['league']),
|
|
239
|
+
'springLeague': MLBLeagueToJSON(value['springLeague']),
|
|
240
|
+
'division': MLBDivisionToJSON(value['division']),
|
|
241
|
+
'sport': MLBSportToJSON(value['sport']),
|
|
242
|
+
'shortName': value['shortName'],
|
|
243
|
+
'franchiseName': value['franchiseName'],
|
|
244
|
+
'clubName': value['clubName'],
|
|
245
|
+
'active': value['active'],
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
|
|
@@ -0,0 +1,76 @@
|
|
|
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 MLBTeamRecord
|
|
20
|
+
*/
|
|
21
|
+
export interface MLBTeamRecord {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof MLBTeamRecord
|
|
26
|
+
*/
|
|
27
|
+
wins?: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof MLBTeamRecord
|
|
32
|
+
*/
|
|
33
|
+
losses?: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof MLBTeamRecord
|
|
38
|
+
*/
|
|
39
|
+
pct?: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the MLBTeamRecord interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfMLBTeamRecord(value: object): value is MLBTeamRecord {
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function MLBTeamRecordFromJSON(json: any): MLBTeamRecord {
|
|
50
|
+
return MLBTeamRecordFromJSONTyped(json, false);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function MLBTeamRecordFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBTeamRecord {
|
|
54
|
+
if (json == null) {
|
|
55
|
+
return json;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
|
|
59
|
+
'wins': json['wins'] == null ? undefined : json['wins'],
|
|
60
|
+
'losses': json['losses'] == null ? undefined : json['losses'],
|
|
61
|
+
'pct': json['pct'] == null ? undefined : json['pct'],
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function MLBTeamRecordToJSON(value?: MLBTeamRecord | null): any {
|
|
66
|
+
if (value == null) {
|
|
67
|
+
return value;
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'wins': value['wins'],
|
|
72
|
+
'losses': value['losses'],
|
|
73
|
+
'pct': value['pct'],
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
@@ -0,0 +1,88 @@
|
|
|
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 MLBTeamRecord1
|
|
20
|
+
*/
|
|
21
|
+
export interface MLBTeamRecord1 {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof MLBTeamRecord1
|
|
26
|
+
*/
|
|
27
|
+
wins: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof MLBTeamRecord1
|
|
32
|
+
*/
|
|
33
|
+
losses: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof MLBTeamRecord1
|
|
38
|
+
*/
|
|
39
|
+
ties: number;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof MLBTeamRecord1
|
|
44
|
+
*/
|
|
45
|
+
pct: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Check if a given object implements the MLBTeamRecord1 interface.
|
|
50
|
+
*/
|
|
51
|
+
export function instanceOfMLBTeamRecord1(value: object): value is MLBTeamRecord1 {
|
|
52
|
+
if (!('wins' in value) || value['wins'] === undefined) return false;
|
|
53
|
+
if (!('losses' in value) || value['losses'] === undefined) return false;
|
|
54
|
+
if (!('ties' in value) || value['ties'] === undefined) return false;
|
|
55
|
+
if (!('pct' in value) || value['pct'] === undefined) return false;
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function MLBTeamRecord1FromJSON(json: any): MLBTeamRecord1 {
|
|
60
|
+
return MLBTeamRecord1FromJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function MLBTeamRecord1FromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBTeamRecord1 {
|
|
64
|
+
if (json == null) {
|
|
65
|
+
return json;
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
|
|
69
|
+
'wins': json['wins'],
|
|
70
|
+
'losses': json['losses'],
|
|
71
|
+
'ties': json['ties'],
|
|
72
|
+
'pct': json['pct'],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function MLBTeamRecord1ToJSON(value?: MLBTeamRecord1 | null): any {
|
|
77
|
+
if (value == null) {
|
|
78
|
+
return value;
|
|
79
|
+
}
|
|
80
|
+
return {
|
|
81
|
+
|
|
82
|
+
'wins': value['wins'],
|
|
83
|
+
'losses': value['losses'],
|
|
84
|
+
'ties': value['ties'],
|
|
85
|
+
'pct': value['pct'],
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
@@ -0,0 +1,67 @@
|
|
|
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 { Team } from './Team';
|
|
17
|
+
import {
|
|
18
|
+
TeamFromJSON,
|
|
19
|
+
TeamFromJSONTyped,
|
|
20
|
+
TeamToJSON,
|
|
21
|
+
} from './Team';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface MLBTeams
|
|
27
|
+
*/
|
|
28
|
+
export interface MLBTeams {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {Array<Team>}
|
|
32
|
+
* @memberof MLBTeams
|
|
33
|
+
*/
|
|
34
|
+
teams?: Array<Team>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the MLBTeams interface.
|
|
39
|
+
*/
|
|
40
|
+
export function instanceOfMLBTeams(value: object): value is MLBTeams {
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function MLBTeamsFromJSON(json: any): MLBTeams {
|
|
45
|
+
return MLBTeamsFromJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function MLBTeamsFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBTeams {
|
|
49
|
+
if (json == null) {
|
|
50
|
+
return json;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
|
|
54
|
+
'teams': json['teams'] == null ? undefined : ((json['teams'] as Array<any>).map(TeamFromJSON)),
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function MLBTeamsToJSON(value?: MLBTeams | null): any {
|
|
59
|
+
if (value == null) {
|
|
60
|
+
return value;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
|
|
64
|
+
'teams': value['teams'] == null ? undefined : ((value['teams'] as Array<any>).map(TeamToJSON)),
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
@@ -0,0 +1,95 @@
|
|
|
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
|
+
* Venue
|
|
18
|
+
*
|
|
19
|
+
* @export
|
|
20
|
+
* @interface MLBVenue
|
|
21
|
+
*/
|
|
22
|
+
export interface MLBVenue {
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @type {number}
|
|
26
|
+
* @memberof MLBVenue
|
|
27
|
+
*/
|
|
28
|
+
id: number;
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @memberof MLBVenue
|
|
33
|
+
*/
|
|
34
|
+
name: string;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof MLBVenue
|
|
39
|
+
*/
|
|
40
|
+
link?: string;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {boolean}
|
|
44
|
+
* @memberof MLBVenue
|
|
45
|
+
*/
|
|
46
|
+
active?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {string}
|
|
50
|
+
* @memberof MLBVenue
|
|
51
|
+
*/
|
|
52
|
+
season?: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Check if a given object implements the MLBVenue interface.
|
|
57
|
+
*/
|
|
58
|
+
export function instanceOfMLBVenue(value: object): value is MLBVenue {
|
|
59
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
60
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function MLBVenueFromJSON(json: any): MLBVenue {
|
|
65
|
+
return MLBVenueFromJSONTyped(json, false);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function MLBVenueFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBVenue {
|
|
69
|
+
if (json == null) {
|
|
70
|
+
return json;
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
|
|
74
|
+
'id': json['id'],
|
|
75
|
+
'name': json['name'],
|
|
76
|
+
'link': json['link'] == null ? undefined : json['link'],
|
|
77
|
+
'active': json['active'] == null ? undefined : json['active'],
|
|
78
|
+
'season': json['season'] == null ? undefined : json['season'],
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function MLBVenueToJSON(value?: MLBVenue | null): any {
|
|
83
|
+
if (value == null) {
|
|
84
|
+
return value;
|
|
85
|
+
}
|
|
86
|
+
return {
|
|
87
|
+
|
|
88
|
+
'id': value['id'],
|
|
89
|
+
'name': value['name'],
|
|
90
|
+
'link': value['link'],
|
|
91
|
+
'active': value['active'],
|
|
92
|
+
'season': value['season'],
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|