@bp1222/stats-api 0.0.1 → 0.0.2
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 +3 -2
- package/openapitools.json +16 -13
- package/package.json +8 -2
- package/spec/components/schemas/game.yaml +2 -6
- package/spec/components/schemas/gameTeam.yaml +1 -9
- package/spec/components/schemas/leagueRecord.yaml +15 -0
- package/spec/components/schemas/record.yaml +1 -16
- package/spec/components/schemas/schedule.yaml +1 -1
- package/spec/components/schemas/schemas.yaml +2 -0
- package/src/.openapi-generator/FILES +14 -16
- package/src/.openapi-generator/VERSION +1 -1
- package/src/apis/MlbApi.ts +112 -13
- package/src/models/MLBGame.ts +1 -15
- package/src/models/MLBGameTeam.ts +10 -10
- package/src/models/{MLBTeamRecord1.ts → MLBLeagueRecord.ts} +14 -15
- package/src/models/MLBRecord.ts +9 -9
- package/src/models/MLBSchedule.ts +9 -9
- package/src/models/{MLBScheduleDay.ts → MLBScheduleDays.ts} +23 -23
- package/src/models/MLBSeasons.ts +9 -9
- package/src/models/MLBStandingsList.ts +9 -9
- package/src/models/MLBTeams.ts +9 -9
- package/src/models/index.ts +14 -16
- package/spec/components/parameters/query/eventTypes.yaml +0 -5
- package/spec/components/parameters/query/gamePks.yaml +0 -5
- package/spec/components/parameters/query/gameTypes.yaml +0 -5
- package/spec/components/parameters/query/opponentId.yaml +0 -5
- package/spec/components/parameters/query/scheduleType.yaml +0 -5
- package/spec/components/parameters/query/venueIds.yaml +0 -5
- package/src/models/Division.ts +0 -164
- package/src/models/Game.ts +0 -385
- package/src/models/GameContent.ts +0 -60
- package/src/models/GameTeam.ts +0 -117
- package/src/models/GameTeams.ts +0 -77
- package/src/models/League.ts +0 -190
- package/src/models/MLBGameContent.ts +0 -60
- package/src/models/MLBTeamRecord.ts +0 -76
- package/src/models/Record.ts +0 -337
- package/src/models/Schedule.ts +0 -105
- package/src/models/Season.ts +0 -226
- package/src/models/Sport.ts +0 -110
- package/src/models/Standings.ts +0 -130
- package/src/models/Team.ts +0 -248
- package/src/models/Venue.ts +0 -95
package/src/models/Schedule.ts
DELETED
|
@@ -1,105 +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.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
|
-
|
package/src/models/Season.ts
DELETED
|
@@ -1,226 +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.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
|
-
|
package/src/models/Sport.ts
DELETED
|
@@ -1,110 +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.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
|
-
* Sport
|
|
18
|
-
*
|
|
19
|
-
* @export
|
|
20
|
-
* @interface Sport
|
|
21
|
-
*/
|
|
22
|
-
export interface Sport {
|
|
23
|
-
/**
|
|
24
|
-
*
|
|
25
|
-
* @type {number}
|
|
26
|
-
* @memberof Sport
|
|
27
|
-
*/
|
|
28
|
-
id: number;
|
|
29
|
-
/**
|
|
30
|
-
*
|
|
31
|
-
* @type {string}
|
|
32
|
-
* @memberof Sport
|
|
33
|
-
*/
|
|
34
|
-
code?: string;
|
|
35
|
-
/**
|
|
36
|
-
*
|
|
37
|
-
* @type {string}
|
|
38
|
-
* @memberof Sport
|
|
39
|
-
*/
|
|
40
|
-
link?: string;
|
|
41
|
-
/**
|
|
42
|
-
*
|
|
43
|
-
* @type {string}
|
|
44
|
-
* @memberof Sport
|
|
45
|
-
*/
|
|
46
|
-
name?: string;
|
|
47
|
-
/**
|
|
48
|
-
*
|
|
49
|
-
* @type {string}
|
|
50
|
-
* @memberof Sport
|
|
51
|
-
*/
|
|
52
|
-
abbreviation?: string;
|
|
53
|
-
/**
|
|
54
|
-
*
|
|
55
|
-
* @type {number}
|
|
56
|
-
* @memberof Sport
|
|
57
|
-
*/
|
|
58
|
-
sortOrder?: number;
|
|
59
|
-
/**
|
|
60
|
-
*
|
|
61
|
-
* @type {boolean}
|
|
62
|
-
* @memberof Sport
|
|
63
|
-
*/
|
|
64
|
-
activeStatus?: boolean;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Check if a given object implements the Sport interface.
|
|
69
|
-
*/
|
|
70
|
-
export function instanceOfSport(value: object): value is Sport {
|
|
71
|
-
if (!('id' in value) || value['id'] === undefined) return false;
|
|
72
|
-
return true;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export function SportFromJSON(json: any): Sport {
|
|
76
|
-
return SportFromJSONTyped(json, false);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export function SportFromJSONTyped(json: any, ignoreDiscriminator: boolean): Sport {
|
|
80
|
-
if (json == null) {
|
|
81
|
-
return json;
|
|
82
|
-
}
|
|
83
|
-
return {
|
|
84
|
-
|
|
85
|
-
'id': json['id'],
|
|
86
|
-
'code': json['code'] == null ? undefined : json['code'],
|
|
87
|
-
'link': json['link'] == null ? undefined : json['link'],
|
|
88
|
-
'name': json['name'] == null ? undefined : json['name'],
|
|
89
|
-
'abbreviation': json['abbreviation'] == null ? undefined : json['abbreviation'],
|
|
90
|
-
'sortOrder': json['sortOrder'] == null ? undefined : json['sortOrder'],
|
|
91
|
-
'activeStatus': json['activeStatus'] == null ? undefined : json['activeStatus'],
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export function SportToJSON(value?: Sport | null): any {
|
|
96
|
-
if (value == null) {
|
|
97
|
-
return value;
|
|
98
|
-
}
|
|
99
|
-
return {
|
|
100
|
-
|
|
101
|
-
'id': value['id'],
|
|
102
|
-
'code': value['code'],
|
|
103
|
-
'link': value['link'],
|
|
104
|
-
'name': value['name'],
|
|
105
|
-
'abbreviation': value['abbreviation'],
|
|
106
|
-
'sortOrder': value['sortOrder'],
|
|
107
|
-
'activeStatus': value['activeStatus'],
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
|
package/src/models/Standings.ts
DELETED
|
@@ -1,130 +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.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 { League } from './League';
|
|
17
|
-
import {
|
|
18
|
-
LeagueFromJSON,
|
|
19
|
-
LeagueFromJSONTyped,
|
|
20
|
-
LeagueToJSON,
|
|
21
|
-
} from './League';
|
|
22
|
-
import type { Sport } from './Sport';
|
|
23
|
-
import {
|
|
24
|
-
SportFromJSON,
|
|
25
|
-
SportFromJSONTyped,
|
|
26
|
-
SportToJSON,
|
|
27
|
-
} from './Sport';
|
|
28
|
-
import type { Division } from './Division';
|
|
29
|
-
import {
|
|
30
|
-
DivisionFromJSON,
|
|
31
|
-
DivisionFromJSONTyped,
|
|
32
|
-
DivisionToJSON,
|
|
33
|
-
} from './Division';
|
|
34
|
-
import type { Record } from './Record';
|
|
35
|
-
import {
|
|
36
|
-
RecordFromJSON,
|
|
37
|
-
RecordFromJSONTyped,
|
|
38
|
-
RecordToJSON,
|
|
39
|
-
} from './Record';
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Standings
|
|
43
|
-
*
|
|
44
|
-
* @export
|
|
45
|
-
* @interface Standings
|
|
46
|
-
*/
|
|
47
|
-
export interface Standings {
|
|
48
|
-
/**
|
|
49
|
-
*
|
|
50
|
-
* @type {string}
|
|
51
|
-
* @memberof Standings
|
|
52
|
-
*/
|
|
53
|
-
standingsType?: string;
|
|
54
|
-
/**
|
|
55
|
-
*
|
|
56
|
-
* @type {League}
|
|
57
|
-
* @memberof Standings
|
|
58
|
-
*/
|
|
59
|
-
league: League;
|
|
60
|
-
/**
|
|
61
|
-
*
|
|
62
|
-
* @type {Division}
|
|
63
|
-
* @memberof Standings
|
|
64
|
-
*/
|
|
65
|
-
division: Division;
|
|
66
|
-
/**
|
|
67
|
-
*
|
|
68
|
-
* @type {Sport}
|
|
69
|
-
* @memberof Standings
|
|
70
|
-
*/
|
|
71
|
-
sport: Sport;
|
|
72
|
-
/**
|
|
73
|
-
*
|
|
74
|
-
* @type {string}
|
|
75
|
-
* @memberof Standings
|
|
76
|
-
*/
|
|
77
|
-
lastUpdated?: string;
|
|
78
|
-
/**
|
|
79
|
-
*
|
|
80
|
-
* @type {Array<Record>}
|
|
81
|
-
* @memberof Standings
|
|
82
|
-
*/
|
|
83
|
-
teamRecords: Array<Record>;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Check if a given object implements the Standings interface.
|
|
88
|
-
*/
|
|
89
|
-
export function instanceOfStandings(value: object): value is Standings {
|
|
90
|
-
if (!('league' in value) || value['league'] === undefined) return false;
|
|
91
|
-
if (!('division' in value) || value['division'] === undefined) return false;
|
|
92
|
-
if (!('sport' in value) || value['sport'] === undefined) return false;
|
|
93
|
-
if (!('teamRecords' in value) || value['teamRecords'] === undefined) return false;
|
|
94
|
-
return true;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export function StandingsFromJSON(json: any): Standings {
|
|
98
|
-
return StandingsFromJSONTyped(json, false);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export function StandingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Standings {
|
|
102
|
-
if (json == null) {
|
|
103
|
-
return json;
|
|
104
|
-
}
|
|
105
|
-
return {
|
|
106
|
-
|
|
107
|
-
'standingsType': json['standingsType'] == null ? undefined : json['standingsType'],
|
|
108
|
-
'league': LeagueFromJSON(json['league']),
|
|
109
|
-
'division': DivisionFromJSON(json['division']),
|
|
110
|
-
'sport': SportFromJSON(json['sport']),
|
|
111
|
-
'lastUpdated': json['lastUpdated'] == null ? undefined : json['lastUpdated'],
|
|
112
|
-
'teamRecords': ((json['teamRecords'] as Array<any>).map(RecordFromJSON)),
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
export function StandingsToJSON(value?: Standings | null): any {
|
|
117
|
-
if (value == null) {
|
|
118
|
-
return value;
|
|
119
|
-
}
|
|
120
|
-
return {
|
|
121
|
-
|
|
122
|
-
'standingsType': value['standingsType'],
|
|
123
|
-
'league': LeagueToJSON(value['league']),
|
|
124
|
-
'division': DivisionToJSON(value['division']),
|
|
125
|
-
'sport': SportToJSON(value['sport']),
|
|
126
|
-
'lastUpdated': value['lastUpdated'],
|
|
127
|
-
'teamRecords': ((value['teamRecords'] as Array<any>).map(RecordToJSON)),
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
|