@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.
Files changed (43) hide show
  1. package/Makefile +3 -2
  2. package/openapitools.json +16 -13
  3. package/package.json +8 -2
  4. package/spec/components/schemas/game.yaml +2 -6
  5. package/spec/components/schemas/gameTeam.yaml +1 -9
  6. package/spec/components/schemas/leagueRecord.yaml +15 -0
  7. package/spec/components/schemas/record.yaml +1 -16
  8. package/spec/components/schemas/schedule.yaml +1 -1
  9. package/spec/components/schemas/schemas.yaml +2 -0
  10. package/src/.openapi-generator/FILES +14 -16
  11. package/src/.openapi-generator/VERSION +1 -1
  12. package/src/apis/MlbApi.ts +112 -13
  13. package/src/models/MLBGame.ts +1 -15
  14. package/src/models/MLBGameTeam.ts +10 -10
  15. package/src/models/{MLBTeamRecord1.ts → MLBLeagueRecord.ts} +14 -15
  16. package/src/models/MLBRecord.ts +9 -9
  17. package/src/models/MLBSchedule.ts +9 -9
  18. package/src/models/{MLBScheduleDay.ts → MLBScheduleDays.ts} +23 -23
  19. package/src/models/MLBSeasons.ts +9 -9
  20. package/src/models/MLBStandingsList.ts +9 -9
  21. package/src/models/MLBTeams.ts +9 -9
  22. package/src/models/index.ts +14 -16
  23. package/spec/components/parameters/query/eventTypes.yaml +0 -5
  24. package/spec/components/parameters/query/gamePks.yaml +0 -5
  25. package/spec/components/parameters/query/gameTypes.yaml +0 -5
  26. package/spec/components/parameters/query/opponentId.yaml +0 -5
  27. package/spec/components/parameters/query/scheduleType.yaml +0 -5
  28. package/spec/components/parameters/query/venueIds.yaml +0 -5
  29. package/src/models/Division.ts +0 -164
  30. package/src/models/Game.ts +0 -385
  31. package/src/models/GameContent.ts +0 -60
  32. package/src/models/GameTeam.ts +0 -117
  33. package/src/models/GameTeams.ts +0 -77
  34. package/src/models/League.ts +0 -190
  35. package/src/models/MLBGameContent.ts +0 -60
  36. package/src/models/MLBTeamRecord.ts +0 -76
  37. package/src/models/Record.ts +0 -337
  38. package/src/models/Schedule.ts +0 -105
  39. package/src/models/Season.ts +0 -226
  40. package/src/models/Sport.ts +0 -110
  41. package/src/models/Standings.ts +0 -130
  42. package/src/models/Team.ts +0 -248
  43. package/src/models/Venue.ts +0 -95
@@ -1,190 +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 { 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
-
@@ -1,60 +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
- *
18
- * @export
19
- * @interface MLBGameContent
20
- */
21
- export interface MLBGameContent {
22
- /**
23
- *
24
- * @type {string}
25
- * @memberof MLBGameContent
26
- */
27
- link?: string;
28
- }
29
-
30
- /**
31
- * Check if a given object implements the MLBGameContent interface.
32
- */
33
- export function instanceOfMLBGameContent(value: object): value is MLBGameContent {
34
- return true;
35
- }
36
-
37
- export function MLBGameContentFromJSON(json: any): MLBGameContent {
38
- return MLBGameContentFromJSONTyped(json, false);
39
- }
40
-
41
- export function MLBGameContentFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBGameContent {
42
- if (json == null) {
43
- return json;
44
- }
45
- return {
46
-
47
- 'link': json['link'] == null ? undefined : json['link'],
48
- };
49
- }
50
-
51
- export function MLBGameContentToJSON(value?: MLBGameContent | null): any {
52
- if (value == null) {
53
- return value;
54
- }
55
- return {
56
-
57
- 'link': value['link'],
58
- };
59
- }
60
-
@@ -1,76 +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
- *
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
-
@@ -1,337 +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 { 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
-