@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,190 @@
|
|
|
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 { MLBLeagueDates } from './MLBLeagueDates';
|
|
17
|
+
import {
|
|
18
|
+
MLBLeagueDatesFromJSON,
|
|
19
|
+
MLBLeagueDatesFromJSONTyped,
|
|
20
|
+
MLBLeagueDatesToJSON,
|
|
21
|
+
} from './MLBLeagueDates';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* League
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface League
|
|
28
|
+
*/
|
|
29
|
+
export interface League {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof League
|
|
34
|
+
*/
|
|
35
|
+
id: number;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof League
|
|
40
|
+
*/
|
|
41
|
+
name: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof League
|
|
46
|
+
*/
|
|
47
|
+
link?: string;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof League
|
|
52
|
+
*/
|
|
53
|
+
abbreviation?: string;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof League
|
|
58
|
+
*/
|
|
59
|
+
nameShort?: string;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {string}
|
|
63
|
+
* @memberof League
|
|
64
|
+
*/
|
|
65
|
+
seasonState?: string;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @type {boolean}
|
|
69
|
+
* @memberof League
|
|
70
|
+
*/
|
|
71
|
+
hasWildCard?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @type {boolean}
|
|
75
|
+
* @memberof League
|
|
76
|
+
*/
|
|
77
|
+
hasSplitSeason?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
* @type {boolean}
|
|
81
|
+
* @memberof League
|
|
82
|
+
*/
|
|
83
|
+
hasPlayoffPoints?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
*
|
|
86
|
+
* @type {MLBLeagueDates}
|
|
87
|
+
* @memberof League
|
|
88
|
+
*/
|
|
89
|
+
seasonDateInfo?: MLBLeagueDates;
|
|
90
|
+
/**
|
|
91
|
+
*
|
|
92
|
+
* @type {string}
|
|
93
|
+
* @memberof League
|
|
94
|
+
*/
|
|
95
|
+
season?: string;
|
|
96
|
+
/**
|
|
97
|
+
*
|
|
98
|
+
* @type {string}
|
|
99
|
+
* @memberof League
|
|
100
|
+
*/
|
|
101
|
+
orgCode?: string;
|
|
102
|
+
/**
|
|
103
|
+
*
|
|
104
|
+
* @type {boolean}
|
|
105
|
+
* @memberof League
|
|
106
|
+
*/
|
|
107
|
+
conferencesInUse?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
*
|
|
110
|
+
* @type {boolean}
|
|
111
|
+
* @memberof League
|
|
112
|
+
*/
|
|
113
|
+
divisionsInUse?: boolean;
|
|
114
|
+
/**
|
|
115
|
+
*
|
|
116
|
+
* @type {number}
|
|
117
|
+
* @memberof League
|
|
118
|
+
*/
|
|
119
|
+
sortOrder?: number;
|
|
120
|
+
/**
|
|
121
|
+
*
|
|
122
|
+
* @type {boolean}
|
|
123
|
+
* @memberof League
|
|
124
|
+
*/
|
|
125
|
+
active?: boolean;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Check if a given object implements the League interface.
|
|
130
|
+
*/
|
|
131
|
+
export function instanceOfLeague(value: object): value is League {
|
|
132
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
133
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
134
|
+
return true;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export function LeagueFromJSON(json: any): League {
|
|
138
|
+
return LeagueFromJSONTyped(json, false);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export function LeagueFromJSONTyped(json: any, ignoreDiscriminator: boolean): League {
|
|
142
|
+
if (json == null) {
|
|
143
|
+
return json;
|
|
144
|
+
}
|
|
145
|
+
return {
|
|
146
|
+
|
|
147
|
+
'id': json['id'],
|
|
148
|
+
'name': json['name'],
|
|
149
|
+
'link': json['link'] == null ? undefined : json['link'],
|
|
150
|
+
'abbreviation': json['abbreviation'] == null ? undefined : json['abbreviation'],
|
|
151
|
+
'nameShort': json['nameShort'] == null ? undefined : json['nameShort'],
|
|
152
|
+
'seasonState': json['seasonState'] == null ? undefined : json['seasonState'],
|
|
153
|
+
'hasWildCard': json['hasWildCard'] == null ? undefined : json['hasWildCard'],
|
|
154
|
+
'hasSplitSeason': json['hasSplitSeason'] == null ? undefined : json['hasSplitSeason'],
|
|
155
|
+
'hasPlayoffPoints': json['hasPlayoffPoints'] == null ? undefined : json['hasPlayoffPoints'],
|
|
156
|
+
'seasonDateInfo': json['seasonDateInfo'] == null ? undefined : MLBLeagueDatesFromJSON(json['seasonDateInfo']),
|
|
157
|
+
'season': json['season'] == null ? undefined : json['season'],
|
|
158
|
+
'orgCode': json['orgCode'] == null ? undefined : json['orgCode'],
|
|
159
|
+
'conferencesInUse': json['conferencesInUse'] == null ? undefined : json['conferencesInUse'],
|
|
160
|
+
'divisionsInUse': json['divisionsInUse'] == null ? undefined : json['divisionsInUse'],
|
|
161
|
+
'sortOrder': json['sortOrder'] == null ? undefined : json['sortOrder'],
|
|
162
|
+
'active': json['active'] == null ? undefined : json['active'],
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export function LeagueToJSON(value?: League | null): any {
|
|
167
|
+
if (value == null) {
|
|
168
|
+
return value;
|
|
169
|
+
}
|
|
170
|
+
return {
|
|
171
|
+
|
|
172
|
+
'id': value['id'],
|
|
173
|
+
'name': value['name'],
|
|
174
|
+
'link': value['link'],
|
|
175
|
+
'abbreviation': value['abbreviation'],
|
|
176
|
+
'nameShort': value['nameShort'],
|
|
177
|
+
'seasonState': value['seasonState'],
|
|
178
|
+
'hasWildCard': value['hasWildCard'],
|
|
179
|
+
'hasSplitSeason': value['hasSplitSeason'],
|
|
180
|
+
'hasPlayoffPoints': value['hasPlayoffPoints'],
|
|
181
|
+
'seasonDateInfo': MLBLeagueDatesToJSON(value['seasonDateInfo']),
|
|
182
|
+
'season': value['season'],
|
|
183
|
+
'orgCode': value['orgCode'],
|
|
184
|
+
'conferencesInUse': value['conferencesInUse'],
|
|
185
|
+
'divisionsInUse': value['divisionsInUse'],
|
|
186
|
+
'sortOrder': value['sortOrder'],
|
|
187
|
+
'active': value['active'],
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
|
|
@@ -0,0 +1,164 @@
|
|
|
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 { MLBLeague } from './MLBLeague';
|
|
17
|
+
import {
|
|
18
|
+
MLBLeagueFromJSON,
|
|
19
|
+
MLBLeagueFromJSONTyped,
|
|
20
|
+
MLBLeagueToJSON,
|
|
21
|
+
} from './MLBLeague';
|
|
22
|
+
import type { MLBSport } from './MLBSport';
|
|
23
|
+
import {
|
|
24
|
+
MLBSportFromJSON,
|
|
25
|
+
MLBSportFromJSONTyped,
|
|
26
|
+
MLBSportToJSON,
|
|
27
|
+
} from './MLBSport';
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Division
|
|
31
|
+
*
|
|
32
|
+
* @export
|
|
33
|
+
* @interface MLBDivision
|
|
34
|
+
*/
|
|
35
|
+
export interface MLBDivision {
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof MLBDivision
|
|
40
|
+
*/
|
|
41
|
+
id: number;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof MLBDivision
|
|
46
|
+
*/
|
|
47
|
+
name: string;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof MLBDivision
|
|
52
|
+
*/
|
|
53
|
+
season?: string;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof MLBDivision
|
|
58
|
+
*/
|
|
59
|
+
nameShort?: string;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {string}
|
|
63
|
+
* @memberof MLBDivision
|
|
64
|
+
*/
|
|
65
|
+
link?: string;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @type {string}
|
|
69
|
+
* @memberof MLBDivision
|
|
70
|
+
*/
|
|
71
|
+
abbreviation?: string;
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @type {MLBLeague}
|
|
75
|
+
* @memberof MLBDivision
|
|
76
|
+
*/
|
|
77
|
+
league?: MLBLeague;
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
* @type {MLBSport}
|
|
81
|
+
* @memberof MLBDivision
|
|
82
|
+
*/
|
|
83
|
+
sport?: MLBSport;
|
|
84
|
+
/**
|
|
85
|
+
*
|
|
86
|
+
* @type {boolean}
|
|
87
|
+
* @memberof MLBDivision
|
|
88
|
+
*/
|
|
89
|
+
hasWildcard?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
*
|
|
92
|
+
* @type {number}
|
|
93
|
+
* @memberof MLBDivision
|
|
94
|
+
*/
|
|
95
|
+
sortOrder?: number;
|
|
96
|
+
/**
|
|
97
|
+
*
|
|
98
|
+
* @type {number}
|
|
99
|
+
* @memberof MLBDivision
|
|
100
|
+
*/
|
|
101
|
+
numPlayoffTeams?: number;
|
|
102
|
+
/**
|
|
103
|
+
*
|
|
104
|
+
* @type {boolean}
|
|
105
|
+
* @memberof MLBDivision
|
|
106
|
+
*/
|
|
107
|
+
active?: boolean;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Check if a given object implements the MLBDivision interface.
|
|
112
|
+
*/
|
|
113
|
+
export function instanceOfMLBDivision(value: object): value is MLBDivision {
|
|
114
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
115
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
116
|
+
return true;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export function MLBDivisionFromJSON(json: any): MLBDivision {
|
|
120
|
+
return MLBDivisionFromJSONTyped(json, false);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export function MLBDivisionFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBDivision {
|
|
124
|
+
if (json == null) {
|
|
125
|
+
return json;
|
|
126
|
+
}
|
|
127
|
+
return {
|
|
128
|
+
|
|
129
|
+
'id': json['id'],
|
|
130
|
+
'name': json['name'],
|
|
131
|
+
'season': json['season'] == null ? undefined : json['season'],
|
|
132
|
+
'nameShort': json['nameShort'] == null ? undefined : json['nameShort'],
|
|
133
|
+
'link': json['link'] == null ? undefined : json['link'],
|
|
134
|
+
'abbreviation': json['abbreviation'] == null ? undefined : json['abbreviation'],
|
|
135
|
+
'league': json['league'] == null ? undefined : MLBLeagueFromJSON(json['league']),
|
|
136
|
+
'sport': json['sport'] == null ? undefined : MLBSportFromJSON(json['sport']),
|
|
137
|
+
'hasWildcard': json['hasWildcard'] == null ? undefined : json['hasWildcard'],
|
|
138
|
+
'sortOrder': json['sortOrder'] == null ? undefined : json['sortOrder'],
|
|
139
|
+
'numPlayoffTeams': json['numPlayoffTeams'] == null ? undefined : json['numPlayoffTeams'],
|
|
140
|
+
'active': json['active'] == null ? undefined : json['active'],
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export function MLBDivisionToJSON(value?: MLBDivision | null): any {
|
|
145
|
+
if (value == null) {
|
|
146
|
+
return value;
|
|
147
|
+
}
|
|
148
|
+
return {
|
|
149
|
+
|
|
150
|
+
'id': value['id'],
|
|
151
|
+
'name': value['name'],
|
|
152
|
+
'season': value['season'],
|
|
153
|
+
'nameShort': value['nameShort'],
|
|
154
|
+
'link': value['link'],
|
|
155
|
+
'abbreviation': value['abbreviation'],
|
|
156
|
+
'league': MLBLeagueToJSON(value['league']),
|
|
157
|
+
'sport': MLBSportToJSON(value['sport']),
|
|
158
|
+
'hasWildcard': value['hasWildcard'],
|
|
159
|
+
'sortOrder': value['sortOrder'],
|
|
160
|
+
'numPlayoffTeams': value['numPlayoffTeams'],
|
|
161
|
+
'active': value['active'],
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
|