@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,110 @@
|
|
|
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
|
+
|
|
@@ -0,0 +1,130 @@
|
|
|
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
|
+
|
|
@@ -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 { 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 { Venue } from './Venue';
|
|
29
|
+
import {
|
|
30
|
+
VenueFromJSON,
|
|
31
|
+
VenueFromJSONTyped,
|
|
32
|
+
VenueToJSON,
|
|
33
|
+
} from './Venue';
|
|
34
|
+
import type { Division } from './Division';
|
|
35
|
+
import {
|
|
36
|
+
DivisionFromJSON,
|
|
37
|
+
DivisionFromJSONTyped,
|
|
38
|
+
DivisionToJSON,
|
|
39
|
+
} from './Division';
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Team
|
|
43
|
+
*
|
|
44
|
+
* @export
|
|
45
|
+
* @interface Team
|
|
46
|
+
*/
|
|
47
|
+
export interface Team {
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {number}
|
|
51
|
+
* @memberof Team
|
|
52
|
+
*/
|
|
53
|
+
id: number;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof Team
|
|
58
|
+
*/
|
|
59
|
+
name: string;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {string}
|
|
63
|
+
* @memberof Team
|
|
64
|
+
*/
|
|
65
|
+
link?: string;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @type {string}
|
|
69
|
+
* @memberof Team
|
|
70
|
+
*/
|
|
71
|
+
allStarStatus?: string;
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @type {number}
|
|
75
|
+
* @memberof Team
|
|
76
|
+
*/
|
|
77
|
+
season?: number;
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
* @type {Venue}
|
|
81
|
+
* @memberof Team
|
|
82
|
+
*/
|
|
83
|
+
venue?: Venue;
|
|
84
|
+
/**
|
|
85
|
+
*
|
|
86
|
+
* @type {Venue}
|
|
87
|
+
* @memberof Team
|
|
88
|
+
*/
|
|
89
|
+
springVenue?: Venue;
|
|
90
|
+
/**
|
|
91
|
+
*
|
|
92
|
+
* @type {string}
|
|
93
|
+
* @memberof Team
|
|
94
|
+
*/
|
|
95
|
+
teamCode?: string;
|
|
96
|
+
/**
|
|
97
|
+
*
|
|
98
|
+
* @type {string}
|
|
99
|
+
* @memberof Team
|
|
100
|
+
*/
|
|
101
|
+
fileCode?: string;
|
|
102
|
+
/**
|
|
103
|
+
*
|
|
104
|
+
* @type {string}
|
|
105
|
+
* @memberof Team
|
|
106
|
+
*/
|
|
107
|
+
abbreviation?: string;
|
|
108
|
+
/**
|
|
109
|
+
*
|
|
110
|
+
* @type {string}
|
|
111
|
+
* @memberof Team
|
|
112
|
+
*/
|
|
113
|
+
teamName?: string;
|
|
114
|
+
/**
|
|
115
|
+
*
|
|
116
|
+
* @type {string}
|
|
117
|
+
* @memberof Team
|
|
118
|
+
*/
|
|
119
|
+
locationName?: string;
|
|
120
|
+
/**
|
|
121
|
+
*
|
|
122
|
+
* @type {string}
|
|
123
|
+
* @memberof Team
|
|
124
|
+
*/
|
|
125
|
+
firstYearOfPlay?: string;
|
|
126
|
+
/**
|
|
127
|
+
*
|
|
128
|
+
* @type {League}
|
|
129
|
+
* @memberof Team
|
|
130
|
+
*/
|
|
131
|
+
league?: League;
|
|
132
|
+
/**
|
|
133
|
+
*
|
|
134
|
+
* @type {League}
|
|
135
|
+
* @memberof Team
|
|
136
|
+
*/
|
|
137
|
+
springLeague?: League;
|
|
138
|
+
/**
|
|
139
|
+
*
|
|
140
|
+
* @type {Division}
|
|
141
|
+
* @memberof Team
|
|
142
|
+
*/
|
|
143
|
+
division?: Division;
|
|
144
|
+
/**
|
|
145
|
+
*
|
|
146
|
+
* @type {Sport}
|
|
147
|
+
* @memberof Team
|
|
148
|
+
*/
|
|
149
|
+
sport?: Sport;
|
|
150
|
+
/**
|
|
151
|
+
*
|
|
152
|
+
* @type {string}
|
|
153
|
+
* @memberof Team
|
|
154
|
+
*/
|
|
155
|
+
shortName?: string;
|
|
156
|
+
/**
|
|
157
|
+
*
|
|
158
|
+
* @type {string}
|
|
159
|
+
* @memberof Team
|
|
160
|
+
*/
|
|
161
|
+
franchiseName?: string;
|
|
162
|
+
/**
|
|
163
|
+
*
|
|
164
|
+
* @type {string}
|
|
165
|
+
* @memberof Team
|
|
166
|
+
*/
|
|
167
|
+
clubName?: string;
|
|
168
|
+
/**
|
|
169
|
+
*
|
|
170
|
+
* @type {boolean}
|
|
171
|
+
* @memberof Team
|
|
172
|
+
*/
|
|
173
|
+
active?: boolean;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Check if a given object implements the Team interface.
|
|
178
|
+
*/
|
|
179
|
+
export function instanceOfTeam(value: object): value is Team {
|
|
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 TeamFromJSON(json: any): Team {
|
|
186
|
+
return TeamFromJSONTyped(json, false);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export function TeamFromJSONTyped(json: any, ignoreDiscriminator: boolean): Team {
|
|
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 : VenueFromJSON(json['venue']),
|
|
201
|
+
'springVenue': json['springVenue'] == null ? undefined : VenueFromJSON(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 : LeagueFromJSON(json['league']),
|
|
209
|
+
'springLeague': json['springLeague'] == null ? undefined : LeagueFromJSON(json['springLeague']),
|
|
210
|
+
'division': json['division'] == null ? undefined : DivisionFromJSON(json['division']),
|
|
211
|
+
'sport': json['sport'] == null ? undefined : SportFromJSON(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 TeamToJSON(value?: Team | 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': VenueToJSON(value['venue']),
|
|
231
|
+
'springVenue': VenueToJSON(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': LeagueToJSON(value['league']),
|
|
239
|
+
'springLeague': LeagueToJSON(value['springLeague']),
|
|
240
|
+
'division': DivisionToJSON(value['division']),
|
|
241
|
+
'sport': SportToJSON(value['sport']),
|
|
242
|
+
'shortName': value['shortName'],
|
|
243
|
+
'franchiseName': value['franchiseName'],
|
|
244
|
+
'clubName': value['clubName'],
|
|
245
|
+
'active': value['active'],
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
|
|
@@ -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 Venue
|
|
21
|
+
*/
|
|
22
|
+
export interface Venue {
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @type {number}
|
|
26
|
+
* @memberof Venue
|
|
27
|
+
*/
|
|
28
|
+
id: number;
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @memberof Venue
|
|
33
|
+
*/
|
|
34
|
+
name: string;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof Venue
|
|
39
|
+
*/
|
|
40
|
+
link?: string;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {boolean}
|
|
44
|
+
* @memberof Venue
|
|
45
|
+
*/
|
|
46
|
+
active?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {string}
|
|
50
|
+
* @memberof Venue
|
|
51
|
+
*/
|
|
52
|
+
season?: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Check if a given object implements the Venue interface.
|
|
57
|
+
*/
|
|
58
|
+
export function instanceOfVenue(value: object): value is Venue {
|
|
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 VenueFromJSON(json: any): Venue {
|
|
65
|
+
return VenueFromJSONTyped(json, false);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function VenueFromJSONTyped(json: any, ignoreDiscriminator: boolean): Venue {
|
|
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 VenueToJSON(value?: Venue | 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
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
export * from './Division';
|
|
4
|
+
export * from './Game';
|
|
5
|
+
export * from './GameContent';
|
|
6
|
+
export * from './GameTeam';
|
|
7
|
+
export * from './GameTeams';
|
|
8
|
+
export * from './League';
|
|
9
|
+
export * from './MLBGameStatus';
|
|
10
|
+
export * from './MLBLeagueDates';
|
|
11
|
+
export * from './MLBScheduleDay';
|
|
12
|
+
export * from './MLBSeasons';
|
|
13
|
+
export * from './MLBStandingsList';
|
|
14
|
+
export * from './MLBStreak';
|
|
15
|
+
export * from './MLBTeamRecord';
|
|
16
|
+
export * from './MLBTeamRecord1';
|
|
17
|
+
export * from './MLBTeams';
|
|
18
|
+
export * from './Record';
|
|
19
|
+
export * from './Schedule';
|
|
20
|
+
export * from './Season';
|
|
21
|
+
export * from './Sport';
|
|
22
|
+
export * from './Standings';
|
|
23
|
+
export * from './Team';
|
|
24
|
+
export * from './Venue';
|