@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
@@ -13,12 +13,12 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
- import type { MLBScheduleDay } from './MLBScheduleDay';
16
+ import type { MLBScheduleDays } from './MLBScheduleDays';
17
17
  import {
18
- MLBScheduleDayFromJSON,
19
- MLBScheduleDayFromJSONTyped,
20
- MLBScheduleDayToJSON,
21
- } from './MLBScheduleDay';
18
+ MLBScheduleDaysFromJSON,
19
+ MLBScheduleDaysFromJSONTyped,
20
+ MLBScheduleDaysToJSON,
21
+ } from './MLBScheduleDays';
22
22
 
23
23
  /**
24
24
  * Schedule
@@ -53,10 +53,10 @@ export interface MLBSchedule {
53
53
  totalGamesInProgress: number;
54
54
  /**
55
55
  *
56
- * @type {Array<MLBScheduleDay>}
56
+ * @type {Array<MLBScheduleDays>}
57
57
  * @memberof MLBSchedule
58
58
  */
59
- dates: Array<MLBScheduleDay>;
59
+ dates: Array<MLBScheduleDays>;
60
60
  }
61
61
 
62
62
  /**
@@ -85,7 +85,7 @@ export function MLBScheduleFromJSONTyped(json: any, ignoreDiscriminator: boolean
85
85
  'totalEvents': json['totalEvents'],
86
86
  'totalGames': json['totalGames'],
87
87
  'totalGamesInProgress': json['totalGamesInProgress'],
88
- 'dates': ((json['dates'] as Array<any>).map(MLBScheduleDayFromJSON)),
88
+ 'dates': ((json['dates'] as Array<any>).map(MLBScheduleDaysFromJSON)),
89
89
  };
90
90
  }
91
91
 
@@ -99,7 +99,7 @@ export function MLBScheduleToJSON(value?: MLBSchedule | null): any {
99
99
  'totalEvents': value['totalEvents'],
100
100
  'totalGames': value['totalGames'],
101
101
  'totalGamesInProgress': value['totalGamesInProgress'],
102
- 'dates': ((value['dates'] as Array<any>).map(MLBScheduleDayToJSON)),
102
+ 'dates': ((value['dates'] as Array<any>).map(MLBScheduleDaysToJSON)),
103
103
  };
104
104
  }
105
105
 
@@ -13,70 +13,70 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
- import type { Game } from './Game';
16
+ import type { MLBGame } from './MLBGame';
17
17
  import {
18
- GameFromJSON,
19
- GameFromJSONTyped,
20
- GameToJSON,
21
- } from './Game';
18
+ MLBGameFromJSON,
19
+ MLBGameFromJSONTyped,
20
+ MLBGameToJSON,
21
+ } from './MLBGame';
22
22
 
23
23
  /**
24
24
  *
25
25
  * @export
26
- * @interface MLBScheduleDay
26
+ * @interface MLBScheduleDays
27
27
  */
28
- export interface MLBScheduleDay {
28
+ export interface MLBScheduleDays {
29
29
  /**
30
30
  *
31
31
  * @type {string}
32
- * @memberof MLBScheduleDay
32
+ * @memberof MLBScheduleDays
33
33
  */
34
34
  date?: string;
35
35
  /**
36
36
  *
37
37
  * @type {number}
38
- * @memberof MLBScheduleDay
38
+ * @memberof MLBScheduleDays
39
39
  */
40
40
  totalItems?: number;
41
41
  /**
42
42
  *
43
43
  * @type {number}
44
- * @memberof MLBScheduleDay
44
+ * @memberof MLBScheduleDays
45
45
  */
46
46
  totalEvents?: number;
47
47
  /**
48
48
  *
49
49
  * @type {number}
50
- * @memberof MLBScheduleDay
50
+ * @memberof MLBScheduleDays
51
51
  */
52
52
  totalGames?: number;
53
53
  /**
54
54
  *
55
55
  * @type {number}
56
- * @memberof MLBScheduleDay
56
+ * @memberof MLBScheduleDays
57
57
  */
58
58
  totalGamesInProgress?: number;
59
59
  /**
60
60
  *
61
- * @type {Array<Game>}
62
- * @memberof MLBScheduleDay
61
+ * @type {Array<MLBGame>}
62
+ * @memberof MLBScheduleDays
63
63
  */
64
- games: Array<Game>;
64
+ games: Array<MLBGame>;
65
65
  }
66
66
 
67
67
  /**
68
- * Check if a given object implements the MLBScheduleDay interface.
68
+ * Check if a given object implements the MLBScheduleDays interface.
69
69
  */
70
- export function instanceOfMLBScheduleDay(value: object): value is MLBScheduleDay {
70
+ export function instanceOfMLBScheduleDays(value: object): value is MLBScheduleDays {
71
71
  if (!('games' in value) || value['games'] === undefined) return false;
72
72
  return true;
73
73
  }
74
74
 
75
- export function MLBScheduleDayFromJSON(json: any): MLBScheduleDay {
76
- return MLBScheduleDayFromJSONTyped(json, false);
75
+ export function MLBScheduleDaysFromJSON(json: any): MLBScheduleDays {
76
+ return MLBScheduleDaysFromJSONTyped(json, false);
77
77
  }
78
78
 
79
- export function MLBScheduleDayFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBScheduleDay {
79
+ export function MLBScheduleDaysFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBScheduleDays {
80
80
  if (json == null) {
81
81
  return json;
82
82
  }
@@ -87,11 +87,11 @@ export function MLBScheduleDayFromJSONTyped(json: any, ignoreDiscriminator: bool
87
87
  'totalEvents': json['totalEvents'] == null ? undefined : json['totalEvents'],
88
88
  'totalGames': json['totalGames'] == null ? undefined : json['totalGames'],
89
89
  'totalGamesInProgress': json['totalGamesInProgress'] == null ? undefined : json['totalGamesInProgress'],
90
- 'games': ((json['games'] as Array<any>).map(GameFromJSON)),
90
+ 'games': ((json['games'] as Array<any>).map(MLBGameFromJSON)),
91
91
  };
92
92
  }
93
93
 
94
- export function MLBScheduleDayToJSON(value?: MLBScheduleDay | null): any {
94
+ export function MLBScheduleDaysToJSON(value?: MLBScheduleDays | null): any {
95
95
  if (value == null) {
96
96
  return value;
97
97
  }
@@ -102,7 +102,7 @@ export function MLBScheduleDayToJSON(value?: MLBScheduleDay | null): any {
102
102
  'totalEvents': value['totalEvents'],
103
103
  'totalGames': value['totalGames'],
104
104
  'totalGamesInProgress': value['totalGamesInProgress'],
105
- 'games': ((value['games'] as Array<any>).map(GameToJSON)),
105
+ 'games': ((value['games'] as Array<any>).map(MLBGameToJSON)),
106
106
  };
107
107
  }
108
108
 
@@ -13,12 +13,12 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
- import type { Season } from './Season';
16
+ import type { MLBSeason } from './MLBSeason';
17
17
  import {
18
- SeasonFromJSON,
19
- SeasonFromJSONTyped,
20
- SeasonToJSON,
21
- } from './Season';
18
+ MLBSeasonFromJSON,
19
+ MLBSeasonFromJSONTyped,
20
+ MLBSeasonToJSON,
21
+ } from './MLBSeason';
22
22
 
23
23
  /**
24
24
  *
@@ -28,10 +28,10 @@ import {
28
28
  export interface MLBSeasons {
29
29
  /**
30
30
  *
31
- * @type {Array<Season>}
31
+ * @type {Array<MLBSeason>}
32
32
  * @memberof MLBSeasons
33
33
  */
34
- seasons?: Array<Season>;
34
+ seasons?: Array<MLBSeason>;
35
35
  }
36
36
 
37
37
  /**
@@ -51,7 +51,7 @@ export function MLBSeasonsFromJSONTyped(json: any, ignoreDiscriminator: boolean)
51
51
  }
52
52
  return {
53
53
 
54
- 'seasons': json['seasons'] == null ? undefined : ((json['seasons'] as Array<any>).map(SeasonFromJSON)),
54
+ 'seasons': json['seasons'] == null ? undefined : ((json['seasons'] as Array<any>).map(MLBSeasonFromJSON)),
55
55
  };
56
56
  }
57
57
 
@@ -61,7 +61,7 @@ export function MLBSeasonsToJSON(value?: MLBSeasons | null): any {
61
61
  }
62
62
  return {
63
63
 
64
- 'seasons': value['seasons'] == null ? undefined : ((value['seasons'] as Array<any>).map(SeasonToJSON)),
64
+ 'seasons': value['seasons'] == null ? undefined : ((value['seasons'] as Array<any>).map(MLBSeasonToJSON)),
65
65
  };
66
66
  }
67
67
 
@@ -13,12 +13,12 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
- import type { Standings } from './Standings';
16
+ import type { MLBStandings } from './MLBStandings';
17
17
  import {
18
- StandingsFromJSON,
19
- StandingsFromJSONTyped,
20
- StandingsToJSON,
21
- } from './Standings';
18
+ MLBStandingsFromJSON,
19
+ MLBStandingsFromJSONTyped,
20
+ MLBStandingsToJSON,
21
+ } from './MLBStandings';
22
22
 
23
23
  /**
24
24
  *
@@ -28,10 +28,10 @@ import {
28
28
  export interface MLBStandingsList {
29
29
  /**
30
30
  *
31
- * @type {Array<Standings>}
31
+ * @type {Array<MLBStandings>}
32
32
  * @memberof MLBStandingsList
33
33
  */
34
- records?: Array<Standings>;
34
+ records?: Array<MLBStandings>;
35
35
  }
36
36
 
37
37
  /**
@@ -51,7 +51,7 @@ export function MLBStandingsListFromJSONTyped(json: any, ignoreDiscriminator: bo
51
51
  }
52
52
  return {
53
53
 
54
- 'records': json['records'] == null ? undefined : ((json['records'] as Array<any>).map(StandingsFromJSON)),
54
+ 'records': json['records'] == null ? undefined : ((json['records'] as Array<any>).map(MLBStandingsFromJSON)),
55
55
  };
56
56
  }
57
57
 
@@ -61,7 +61,7 @@ export function MLBStandingsListToJSON(value?: MLBStandingsList | null): any {
61
61
  }
62
62
  return {
63
63
 
64
- 'records': value['records'] == null ? undefined : ((value['records'] as Array<any>).map(StandingsToJSON)),
64
+ 'records': value['records'] == null ? undefined : ((value['records'] as Array<any>).map(MLBStandingsToJSON)),
65
65
  };
66
66
  }
67
67
 
@@ -13,12 +13,12 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
- import type { Team } from './Team';
16
+ import type { MLBTeam } from './MLBTeam';
17
17
  import {
18
- TeamFromJSON,
19
- TeamFromJSONTyped,
20
- TeamToJSON,
21
- } from './Team';
18
+ MLBTeamFromJSON,
19
+ MLBTeamFromJSONTyped,
20
+ MLBTeamToJSON,
21
+ } from './MLBTeam';
22
22
 
23
23
  /**
24
24
  *
@@ -28,10 +28,10 @@ import {
28
28
  export interface MLBTeams {
29
29
  /**
30
30
  *
31
- * @type {Array<Team>}
31
+ * @type {Array<MLBTeam>}
32
32
  * @memberof MLBTeams
33
33
  */
34
- teams?: Array<Team>;
34
+ teams?: Array<MLBTeam>;
35
35
  }
36
36
 
37
37
  /**
@@ -51,7 +51,7 @@ export function MLBTeamsFromJSONTyped(json: any, ignoreDiscriminator: boolean):
51
51
  }
52
52
  return {
53
53
 
54
- 'teams': json['teams'] == null ? undefined : ((json['teams'] as Array<any>).map(TeamFromJSON)),
54
+ 'teams': json['teams'] == null ? undefined : ((json['teams'] as Array<any>).map(MLBTeamFromJSON)),
55
55
  };
56
56
  }
57
57
 
@@ -61,7 +61,7 @@ export function MLBTeamsToJSON(value?: MLBTeams | null): any {
61
61
  }
62
62
  return {
63
63
 
64
- 'teams': value['teams'] == null ? undefined : ((value['teams'] as Array<any>).map(TeamToJSON)),
64
+ 'teams': value['teams'] == null ? undefined : ((value['teams'] as Array<any>).map(MLBTeamToJSON)),
65
65
  };
66
66
  }
67
67
 
@@ -1,24 +1,22 @@
1
1
  /* tslint:disable */
2
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';
3
+ export * from './MLBDivision';
4
+ export * from './MLBGame';
9
5
  export * from './MLBGameStatus';
6
+ export * from './MLBGameTeam';
7
+ export * from './MLBGameTeams';
8
+ export * from './MLBLeague';
10
9
  export * from './MLBLeagueDates';
11
- export * from './MLBScheduleDay';
10
+ export * from './MLBLeagueRecord';
11
+ export * from './MLBRecord';
12
+ export * from './MLBSchedule';
13
+ export * from './MLBScheduleDays';
14
+ export * from './MLBSeason';
12
15
  export * from './MLBSeasons';
16
+ export * from './MLBSport';
17
+ export * from './MLBStandings';
13
18
  export * from './MLBStandingsList';
14
19
  export * from './MLBStreak';
15
- export * from './MLBTeamRecord';
16
- export * from './MLBTeamRecord1';
20
+ export * from './MLBTeam';
17
21
  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';
22
+ export * from './MLBVenue';
@@ -1,5 +0,0 @@
1
- in: query
2
- name: teamId
3
- required: false
4
- schema:
5
- type: number
@@ -1,5 +0,0 @@
1
- in: query
2
- name: teamId
3
- required: false
4
- schema:
5
- type: number
@@ -1,5 +0,0 @@
1
- in: query
2
- name: teamId
3
- required: false
4
- schema:
5
- type: number
@@ -1,5 +0,0 @@
1
- in: query
2
- name: teamId
3
- required: false
4
- schema:
5
- type: number
@@ -1,5 +0,0 @@
1
- in: query
2
- name: teamId
3
- required: false
4
- schema:
5
- type: number
@@ -1,5 +0,0 @@
1
- in: query
2
- name: teamId
3
- required: false
4
- schema:
5
- type: number
@@ -1,164 +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
-
29
- /**
30
- * Division
31
- *
32
- * @export
33
- * @interface Division
34
- */
35
- export interface Division {
36
- /**
37
- *
38
- * @type {number}
39
- * @memberof Division
40
- */
41
- id: number;
42
- /**
43
- *
44
- * @type {string}
45
- * @memberof Division
46
- */
47
- name: string;
48
- /**
49
- *
50
- * @type {string}
51
- * @memberof Division
52
- */
53
- season?: string;
54
- /**
55
- *
56
- * @type {string}
57
- * @memberof Division
58
- */
59
- nameShort?: string;
60
- /**
61
- *
62
- * @type {string}
63
- * @memberof Division
64
- */
65
- link?: string;
66
- /**
67
- *
68
- * @type {string}
69
- * @memberof Division
70
- */
71
- abbreviation?: string;
72
- /**
73
- *
74
- * @type {League}
75
- * @memberof Division
76
- */
77
- league?: League;
78
- /**
79
- *
80
- * @type {Sport}
81
- * @memberof Division
82
- */
83
- sport?: Sport;
84
- /**
85
- *
86
- * @type {boolean}
87
- * @memberof Division
88
- */
89
- hasWildcard?: boolean;
90
- /**
91
- *
92
- * @type {number}
93
- * @memberof Division
94
- */
95
- sortOrder?: number;
96
- /**
97
- *
98
- * @type {number}
99
- * @memberof Division
100
- */
101
- numPlayoffTeams?: number;
102
- /**
103
- *
104
- * @type {boolean}
105
- * @memberof Division
106
- */
107
- active?: boolean;
108
- }
109
-
110
- /**
111
- * Check if a given object implements the Division interface.
112
- */
113
- export function instanceOfDivision(value: object): value is Division {
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 DivisionFromJSON(json: any): Division {
120
- return DivisionFromJSONTyped(json, false);
121
- }
122
-
123
- export function DivisionFromJSONTyped(json: any, ignoreDiscriminator: boolean): Division {
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 : LeagueFromJSON(json['league']),
136
- 'sport': json['sport'] == null ? undefined : SportFromJSON(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 DivisionToJSON(value?: Division | 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': LeagueToJSON(value['league']),
157
- 'sport': SportToJSON(value['sport']),
158
- 'hasWildcard': value['hasWildcard'],
159
- 'sortOrder': value['sortOrder'],
160
- 'numPlayoffTeams': value['numPlayoffTeams'],
161
- 'active': value['active'],
162
- };
163
- }
164
-