@bp1222/stats-api 0.0.8 → 0.1.4
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/package.json +2 -2
- package/src/.openapi-generator/FILES +26 -0
- package/src/.openapi-generator/VERSION +1 -0
- package/src/.openapi-generator-ignore +23 -0
- package/src/apis/MlbApi.ts +325 -0
- package/src/apis/index.ts +3 -0
- package/src/index.ts +5 -0
- package/src/models/MLBDivision.ts +164 -0
- package/src/models/MLBGame.ts +371 -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/MLBLeagueRecord.ts +87 -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/MLBTeams.ts +67 -0
- package/src/models/MLBVenue.ts +95 -0
- package/src/models/index.ts +22 -0
- package/src/runtime.ts +426 -0
- package/dist/index.d.mts +0 -565
- package/dist/index.d.ts +0 -565
- package/dist/index.js +0 -1696
- package/dist/index.mjs +0 -1574
|
@@ -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.1.4
|
|
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 MLBLeague
|
|
28
|
+
*/
|
|
29
|
+
export interface MLBLeague {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof MLBLeague
|
|
34
|
+
*/
|
|
35
|
+
id: number;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof MLBLeague
|
|
40
|
+
*/
|
|
41
|
+
name: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof MLBLeague
|
|
46
|
+
*/
|
|
47
|
+
link?: string;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof MLBLeague
|
|
52
|
+
*/
|
|
53
|
+
abbreviation?: string;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof MLBLeague
|
|
58
|
+
*/
|
|
59
|
+
nameShort?: string;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {string}
|
|
63
|
+
* @memberof MLBLeague
|
|
64
|
+
*/
|
|
65
|
+
seasonState?: string;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @type {boolean}
|
|
69
|
+
* @memberof MLBLeague
|
|
70
|
+
*/
|
|
71
|
+
hasWildCard?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @type {boolean}
|
|
75
|
+
* @memberof MLBLeague
|
|
76
|
+
*/
|
|
77
|
+
hasSplitSeason?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
* @type {boolean}
|
|
81
|
+
* @memberof MLBLeague
|
|
82
|
+
*/
|
|
83
|
+
hasPlayoffPoints?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
*
|
|
86
|
+
* @type {MLBLeagueDates}
|
|
87
|
+
* @memberof MLBLeague
|
|
88
|
+
*/
|
|
89
|
+
seasonDateInfo?: MLBLeagueDates;
|
|
90
|
+
/**
|
|
91
|
+
*
|
|
92
|
+
* @type {string}
|
|
93
|
+
* @memberof MLBLeague
|
|
94
|
+
*/
|
|
95
|
+
season?: string;
|
|
96
|
+
/**
|
|
97
|
+
*
|
|
98
|
+
* @type {string}
|
|
99
|
+
* @memberof MLBLeague
|
|
100
|
+
*/
|
|
101
|
+
orgCode?: string;
|
|
102
|
+
/**
|
|
103
|
+
*
|
|
104
|
+
* @type {boolean}
|
|
105
|
+
* @memberof MLBLeague
|
|
106
|
+
*/
|
|
107
|
+
conferencesInUse?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
*
|
|
110
|
+
* @type {boolean}
|
|
111
|
+
* @memberof MLBLeague
|
|
112
|
+
*/
|
|
113
|
+
divisionsInUse?: boolean;
|
|
114
|
+
/**
|
|
115
|
+
*
|
|
116
|
+
* @type {number}
|
|
117
|
+
* @memberof MLBLeague
|
|
118
|
+
*/
|
|
119
|
+
sortOrder?: number;
|
|
120
|
+
/**
|
|
121
|
+
*
|
|
122
|
+
* @type {boolean}
|
|
123
|
+
* @memberof MLBLeague
|
|
124
|
+
*/
|
|
125
|
+
active?: boolean;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Check if a given object implements the MLBLeague interface.
|
|
130
|
+
*/
|
|
131
|
+
export function instanceOfMLBLeague(value: object): value is MLBLeague {
|
|
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 MLBLeagueFromJSON(json: any): MLBLeague {
|
|
138
|
+
return MLBLeagueFromJSONTyped(json, false);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export function MLBLeagueFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBLeague {
|
|
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 MLBLeagueToJSON(value?: MLBLeague | 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,132 @@
|
|
|
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.1.4
|
|
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 MLBLeagueDates
|
|
20
|
+
*/
|
|
21
|
+
export interface MLBLeagueDates {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof MLBLeagueDates
|
|
26
|
+
*/
|
|
27
|
+
seasonId?: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof MLBLeagueDates
|
|
32
|
+
*/
|
|
33
|
+
preSeasonStartDate?: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof MLBLeagueDates
|
|
38
|
+
*/
|
|
39
|
+
preSeasonEndDate?: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof MLBLeagueDates
|
|
44
|
+
*/
|
|
45
|
+
seasonStartDate?: string;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof MLBLeagueDates
|
|
50
|
+
*/
|
|
51
|
+
springStartDate?: string;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof MLBLeagueDates
|
|
56
|
+
*/
|
|
57
|
+
springEndDate?: string;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {string}
|
|
61
|
+
* @memberof MLBLeagueDates
|
|
62
|
+
*/
|
|
63
|
+
offseasonStartDate?: string;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {string}
|
|
67
|
+
* @memberof MLBLeagueDates
|
|
68
|
+
*/
|
|
69
|
+
offseasonEndDate?: string;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {string}
|
|
73
|
+
* @memberof MLBLeagueDates
|
|
74
|
+
*/
|
|
75
|
+
seasonLevelGamedayType?: string;
|
|
76
|
+
/**
|
|
77
|
+
*
|
|
78
|
+
* @type {string}
|
|
79
|
+
* @memberof MLBLeagueDates
|
|
80
|
+
*/
|
|
81
|
+
gameLevelGamedayType?: string;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Check if a given object implements the MLBLeagueDates interface.
|
|
86
|
+
*/
|
|
87
|
+
export function instanceOfMLBLeagueDates(value: object): value is MLBLeagueDates {
|
|
88
|
+
return true;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function MLBLeagueDatesFromJSON(json: any): MLBLeagueDates {
|
|
92
|
+
return MLBLeagueDatesFromJSONTyped(json, false);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function MLBLeagueDatesFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBLeagueDates {
|
|
96
|
+
if (json == null) {
|
|
97
|
+
return json;
|
|
98
|
+
}
|
|
99
|
+
return {
|
|
100
|
+
|
|
101
|
+
'seasonId': json['seasonId'] == null ? undefined : json['seasonId'],
|
|
102
|
+
'preSeasonStartDate': json['preSeasonStartDate'] == null ? undefined : json['preSeasonStartDate'],
|
|
103
|
+
'preSeasonEndDate': json['preSeasonEndDate'] == null ? undefined : json['preSeasonEndDate'],
|
|
104
|
+
'seasonStartDate': json['seasonStartDate'] == null ? undefined : json['seasonStartDate'],
|
|
105
|
+
'springStartDate': json['springStartDate'] == null ? undefined : json['springStartDate'],
|
|
106
|
+
'springEndDate': json['springEndDate'] == null ? undefined : json['springEndDate'],
|
|
107
|
+
'offseasonStartDate': json['offseasonStartDate'] == null ? undefined : json['offseasonStartDate'],
|
|
108
|
+
'offseasonEndDate': json['offseasonEndDate'] == null ? undefined : json['offseasonEndDate'],
|
|
109
|
+
'seasonLevelGamedayType': json['seasonLevelGamedayType'] == null ? undefined : json['seasonLevelGamedayType'],
|
|
110
|
+
'gameLevelGamedayType': json['gameLevelGamedayType'] == null ? undefined : json['gameLevelGamedayType'],
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export function MLBLeagueDatesToJSON(value?: MLBLeagueDates | null): any {
|
|
115
|
+
if (value == null) {
|
|
116
|
+
return value;
|
|
117
|
+
}
|
|
118
|
+
return {
|
|
119
|
+
|
|
120
|
+
'seasonId': value['seasonId'],
|
|
121
|
+
'preSeasonStartDate': value['preSeasonStartDate'],
|
|
122
|
+
'preSeasonEndDate': value['preSeasonEndDate'],
|
|
123
|
+
'seasonStartDate': value['seasonStartDate'],
|
|
124
|
+
'springStartDate': value['springStartDate'],
|
|
125
|
+
'springEndDate': value['springEndDate'],
|
|
126
|
+
'offseasonStartDate': value['offseasonStartDate'],
|
|
127
|
+
'offseasonEndDate': value['offseasonEndDate'],
|
|
128
|
+
'seasonLevelGamedayType': value['seasonLevelGamedayType'],
|
|
129
|
+
'gameLevelGamedayType': value['gameLevelGamedayType'],
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
|
|
@@ -0,0 +1,87 @@
|
|
|
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.1.4
|
|
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 MLBLeagueRecord
|
|
20
|
+
*/
|
|
21
|
+
export interface MLBLeagueRecord {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof MLBLeagueRecord
|
|
26
|
+
*/
|
|
27
|
+
wins: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof MLBLeagueRecord
|
|
32
|
+
*/
|
|
33
|
+
losses: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof MLBLeagueRecord
|
|
38
|
+
*/
|
|
39
|
+
ties?: number;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof MLBLeagueRecord
|
|
44
|
+
*/
|
|
45
|
+
pct: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Check if a given object implements the MLBLeagueRecord interface.
|
|
50
|
+
*/
|
|
51
|
+
export function instanceOfMLBLeagueRecord(value: object): value is MLBLeagueRecord {
|
|
52
|
+
if (!('wins' in value) || value['wins'] === undefined) return false;
|
|
53
|
+
if (!('losses' in value) || value['losses'] === undefined) return false;
|
|
54
|
+
if (!('pct' in value) || value['pct'] === undefined) return false;
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function MLBLeagueRecordFromJSON(json: any): MLBLeagueRecord {
|
|
59
|
+
return MLBLeagueRecordFromJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function MLBLeagueRecordFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBLeagueRecord {
|
|
63
|
+
if (json == null) {
|
|
64
|
+
return json;
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
|
|
68
|
+
'wins': json['wins'],
|
|
69
|
+
'losses': json['losses'],
|
|
70
|
+
'ties': json['ties'] == null ? undefined : json['ties'],
|
|
71
|
+
'pct': json['pct'],
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function MLBLeagueRecordToJSON(value?: MLBLeagueRecord | null): any {
|
|
76
|
+
if (value == null) {
|
|
77
|
+
return value;
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
|
|
81
|
+
'wins': value['wins'],
|
|
82
|
+
'losses': value['losses'],
|
|
83
|
+
'ties': value['ties'],
|
|
84
|
+
'pct': value['pct'],
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|