@bp1222/stats-api 0.0.3 → 0.0.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
CHANGED
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
-
import type {
|
|
16
|
+
import type { MLBScheduleDay } from './MLBScheduleDay';
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} from './
|
|
18
|
+
MLBScheduleDayFromJSON,
|
|
19
|
+
MLBScheduleDayFromJSONTyped,
|
|
20
|
+
MLBScheduleDayToJSON,
|
|
21
|
+
} from './MLBScheduleDay';
|
|
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<
|
|
56
|
+
* @type {Array<MLBScheduleDay>}
|
|
57
57
|
* @memberof MLBSchedule
|
|
58
58
|
*/
|
|
59
|
-
dates: Array<
|
|
59
|
+
dates: Array<MLBScheduleDay>;
|
|
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(
|
|
88
|
+
'dates': ((json['dates'] as Array<any>).map(MLBScheduleDayFromJSON)),
|
|
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(
|
|
102
|
+
'dates': ((value['dates'] as Array<any>).map(MLBScheduleDayToJSON)),
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
105
|
|
|
@@ -0,0 +1,108 @@
|
|
|
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 { MLBGame } from './MLBGame';
|
|
17
|
+
import {
|
|
18
|
+
MLBGameFromJSON,
|
|
19
|
+
MLBGameFromJSONTyped,
|
|
20
|
+
MLBGameToJSON,
|
|
21
|
+
} from './MLBGame';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface MLBScheduleDay
|
|
27
|
+
*/
|
|
28
|
+
export interface MLBScheduleDay {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @memberof MLBScheduleDay
|
|
33
|
+
*/
|
|
34
|
+
date?: string;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {number}
|
|
38
|
+
* @memberof MLBScheduleDay
|
|
39
|
+
*/
|
|
40
|
+
totalItems?: number;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {number}
|
|
44
|
+
* @memberof MLBScheduleDay
|
|
45
|
+
*/
|
|
46
|
+
totalEvents?: number;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {number}
|
|
50
|
+
* @memberof MLBScheduleDay
|
|
51
|
+
*/
|
|
52
|
+
totalGames?: number;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {number}
|
|
56
|
+
* @memberof MLBScheduleDay
|
|
57
|
+
*/
|
|
58
|
+
totalGamesInProgress?: number;
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
* @type {Array<MLBGame>}
|
|
62
|
+
* @memberof MLBScheduleDay
|
|
63
|
+
*/
|
|
64
|
+
games: Array<MLBGame>;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Check if a given object implements the MLBScheduleDay interface.
|
|
69
|
+
*/
|
|
70
|
+
export function instanceOfMLBScheduleDay(value: object): value is MLBScheduleDay {
|
|
71
|
+
if (!('games' in value) || value['games'] === undefined) return false;
|
|
72
|
+
return true;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function MLBScheduleDayFromJSON(json: any): MLBScheduleDay {
|
|
76
|
+
return MLBScheduleDayFromJSONTyped(json, false);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function MLBScheduleDayFromJSONTyped(json: any, ignoreDiscriminator: boolean): MLBScheduleDay {
|
|
80
|
+
if (json == null) {
|
|
81
|
+
return json;
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
|
|
85
|
+
'date': json['date'] == null ? undefined : json['date'],
|
|
86
|
+
'totalItems': json['totalItems'] == null ? undefined : json['totalItems'],
|
|
87
|
+
'totalEvents': json['totalEvents'] == null ? undefined : json['totalEvents'],
|
|
88
|
+
'totalGames': json['totalGames'] == null ? undefined : json['totalGames'],
|
|
89
|
+
'totalGamesInProgress': json['totalGamesInProgress'] == null ? undefined : json['totalGamesInProgress'],
|
|
90
|
+
'games': ((json['games'] as Array<any>).map(MLBGameFromJSON)),
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function MLBScheduleDayToJSON(value?: MLBScheduleDay | null): any {
|
|
95
|
+
if (value == null) {
|
|
96
|
+
return value;
|
|
97
|
+
}
|
|
98
|
+
return {
|
|
99
|
+
|
|
100
|
+
'date': value['date'],
|
|
101
|
+
'totalItems': value['totalItems'],
|
|
102
|
+
'totalEvents': value['totalEvents'],
|
|
103
|
+
'totalGames': value['totalGames'],
|
|
104
|
+
'totalGamesInProgress': value['totalGamesInProgress'],
|
|
105
|
+
'games': ((value['games'] as Array<any>).map(MLBGameToJSON)),
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -10,7 +10,7 @@ export * from './MLBLeagueDates';
|
|
|
10
10
|
export * from './MLBLeagueRecord';
|
|
11
11
|
export * from './MLBRecord';
|
|
12
12
|
export * from './MLBSchedule';
|
|
13
|
-
export * from './
|
|
13
|
+
export * from './MLBScheduleDay';
|
|
14
14
|
export * from './MLBSeason';
|
|
15
15
|
export * from './MLBSeasons';
|
|
16
16
|
export * from './MLBSport';
|