@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.
- package/Makefile +3 -2
- package/openapitools.json +16 -13
- package/package.json +8 -2
- package/spec/components/schemas/game.yaml +2 -6
- package/spec/components/schemas/gameTeam.yaml +1 -9
- package/spec/components/schemas/leagueRecord.yaml +15 -0
- package/spec/components/schemas/record.yaml +1 -16
- package/spec/components/schemas/schedule.yaml +1 -1
- package/spec/components/schemas/schemas.yaml +2 -0
- package/src/.openapi-generator/FILES +14 -16
- package/src/.openapi-generator/VERSION +1 -1
- package/src/apis/MlbApi.ts +112 -13
- package/src/models/MLBGame.ts +1 -15
- package/src/models/MLBGameTeam.ts +10 -10
- package/src/models/{MLBTeamRecord1.ts → MLBLeagueRecord.ts} +14 -15
- package/src/models/MLBRecord.ts +9 -9
- package/src/models/MLBSchedule.ts +9 -9
- package/src/models/{MLBScheduleDay.ts → MLBScheduleDays.ts} +23 -23
- package/src/models/MLBSeasons.ts +9 -9
- package/src/models/MLBStandingsList.ts +9 -9
- package/src/models/MLBTeams.ts +9 -9
- package/src/models/index.ts +14 -16
- package/spec/components/parameters/query/eventTypes.yaml +0 -5
- package/spec/components/parameters/query/gamePks.yaml +0 -5
- package/spec/components/parameters/query/gameTypes.yaml +0 -5
- package/spec/components/parameters/query/opponentId.yaml +0 -5
- package/spec/components/parameters/query/scheduleType.yaml +0 -5
- package/spec/components/parameters/query/venueIds.yaml +0 -5
- package/src/models/Division.ts +0 -164
- package/src/models/Game.ts +0 -385
- package/src/models/GameContent.ts +0 -60
- package/src/models/GameTeam.ts +0 -117
- package/src/models/GameTeams.ts +0 -77
- package/src/models/League.ts +0 -190
- package/src/models/MLBGameContent.ts +0 -60
- package/src/models/MLBTeamRecord.ts +0 -76
- package/src/models/Record.ts +0 -337
- package/src/models/Schedule.ts +0 -105
- package/src/models/Season.ts +0 -226
- package/src/models/Sport.ts +0 -110
- package/src/models/Standings.ts +0 -130
- package/src/models/Team.ts +0 -248
- package/src/models/Venue.ts +0 -95
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
-
import type {
|
|
16
|
+
import type { MLBScheduleDays } from './MLBScheduleDays';
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} from './
|
|
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<
|
|
56
|
+
* @type {Array<MLBScheduleDays>}
|
|
57
57
|
* @memberof MLBSchedule
|
|
58
58
|
*/
|
|
59
|
-
dates: Array<
|
|
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(
|
|
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(
|
|
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 {
|
|
16
|
+
import type { MLBGame } from './MLBGame';
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} from './
|
|
18
|
+
MLBGameFromJSON,
|
|
19
|
+
MLBGameFromJSONTyped,
|
|
20
|
+
MLBGameToJSON,
|
|
21
|
+
} from './MLBGame';
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
*
|
|
25
25
|
* @export
|
|
26
|
-
* @interface
|
|
26
|
+
* @interface MLBScheduleDays
|
|
27
27
|
*/
|
|
28
|
-
export interface
|
|
28
|
+
export interface MLBScheduleDays {
|
|
29
29
|
/**
|
|
30
30
|
*
|
|
31
31
|
* @type {string}
|
|
32
|
-
* @memberof
|
|
32
|
+
* @memberof MLBScheduleDays
|
|
33
33
|
*/
|
|
34
34
|
date?: string;
|
|
35
35
|
/**
|
|
36
36
|
*
|
|
37
37
|
* @type {number}
|
|
38
|
-
* @memberof
|
|
38
|
+
* @memberof MLBScheduleDays
|
|
39
39
|
*/
|
|
40
40
|
totalItems?: number;
|
|
41
41
|
/**
|
|
42
42
|
*
|
|
43
43
|
* @type {number}
|
|
44
|
-
* @memberof
|
|
44
|
+
* @memberof MLBScheduleDays
|
|
45
45
|
*/
|
|
46
46
|
totalEvents?: number;
|
|
47
47
|
/**
|
|
48
48
|
*
|
|
49
49
|
* @type {number}
|
|
50
|
-
* @memberof
|
|
50
|
+
* @memberof MLBScheduleDays
|
|
51
51
|
*/
|
|
52
52
|
totalGames?: number;
|
|
53
53
|
/**
|
|
54
54
|
*
|
|
55
55
|
* @type {number}
|
|
56
|
-
* @memberof
|
|
56
|
+
* @memberof MLBScheduleDays
|
|
57
57
|
*/
|
|
58
58
|
totalGamesInProgress?: number;
|
|
59
59
|
/**
|
|
60
60
|
*
|
|
61
|
-
* @type {Array<
|
|
62
|
-
* @memberof
|
|
61
|
+
* @type {Array<MLBGame>}
|
|
62
|
+
* @memberof MLBScheduleDays
|
|
63
63
|
*/
|
|
64
|
-
games: Array<
|
|
64
|
+
games: Array<MLBGame>;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
|
-
* Check if a given object implements the
|
|
68
|
+
* Check if a given object implements the MLBScheduleDays interface.
|
|
69
69
|
*/
|
|
70
|
-
export function
|
|
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
|
|
76
|
-
return
|
|
75
|
+
export function MLBScheduleDaysFromJSON(json: any): MLBScheduleDays {
|
|
76
|
+
return MLBScheduleDaysFromJSONTyped(json, false);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
export function
|
|
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(
|
|
90
|
+
'games': ((json['games'] as Array<any>).map(MLBGameFromJSON)),
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
export function
|
|
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(
|
|
105
|
+
'games': ((value['games'] as Array<any>).map(MLBGameToJSON)),
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
108
|
|
package/src/models/MLBSeasons.ts
CHANGED
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
-
import type {
|
|
16
|
+
import type { MLBSeason } from './MLBSeason';
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} from './
|
|
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<
|
|
31
|
+
* @type {Array<MLBSeason>}
|
|
32
32
|
* @memberof MLBSeasons
|
|
33
33
|
*/
|
|
34
|
-
seasons?: Array<
|
|
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(
|
|
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(
|
|
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 {
|
|
16
|
+
import type { MLBStandings } from './MLBStandings';
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} from './
|
|
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<
|
|
31
|
+
* @type {Array<MLBStandings>}
|
|
32
32
|
* @memberof MLBStandingsList
|
|
33
33
|
*/
|
|
34
|
-
records?: Array<
|
|
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(
|
|
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(
|
|
64
|
+
'records': value['records'] == null ? undefined : ((value['records'] as Array<any>).map(MLBStandingsToJSON)),
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
67
|
|
package/src/models/MLBTeams.ts
CHANGED
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
-
import type {
|
|
16
|
+
import type { MLBTeam } from './MLBTeam';
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} from './
|
|
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<
|
|
31
|
+
* @type {Array<MLBTeam>}
|
|
32
32
|
* @memberof MLBTeams
|
|
33
33
|
*/
|
|
34
|
-
teams?: Array<
|
|
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(
|
|
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(
|
|
64
|
+
'teams': value['teams'] == null ? undefined : ((value['teams'] as Array<any>).map(MLBTeamToJSON)),
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
67
|
|
package/src/models/index.ts
CHANGED
|
@@ -1,24 +1,22 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './
|
|
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 './
|
|
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 './
|
|
16
|
-
export * from './MLBTeamRecord1';
|
|
20
|
+
export * from './MLBTeam';
|
|
17
21
|
export * from './MLBTeams';
|
|
18
|
-
export * from './
|
|
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';
|
package/src/models/Division.ts
DELETED
|
@@ -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
|
-
|