@bp1222/stats-api 0.2.2 → 0.2.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/dist/index.d.mts CHANGED
@@ -454,6 +454,55 @@ declare function GameFromJSON(json: any): Game;
454
454
  declare function GameFromJSONTyped(json: any, ignoreDiscriminator: boolean): Game;
455
455
  declare function GameToJSON(value?: Game | null): any;
456
456
 
457
+ interface LinescoreTeam {
458
+ runs?: number;
459
+ hits?: number;
460
+ errors?: number;
461
+ leftOnBase?: number;
462
+ }
463
+ declare function instanceOfLinescoreTeam(value: object): value is LinescoreTeam;
464
+ declare function LinescoreTeamFromJSON(json: any): LinescoreTeam;
465
+ declare function LinescoreTeamFromJSONTyped(json: any, ignoreDiscriminator: boolean): LinescoreTeam;
466
+ declare function LinescoreTeamToJSON(value?: LinescoreTeam | null): any;
467
+
468
+ interface Inning {
469
+ num?: number;
470
+ ordinalNum?: string;
471
+ home?: LinescoreTeam;
472
+ away?: LinescoreTeam;
473
+ }
474
+ declare function instanceOfInning(value: object): value is Inning;
475
+ declare function InningFromJSON(json: any): Inning;
476
+ declare function InningFromJSONTyped(json: any, ignoreDiscriminator: boolean): Inning;
477
+ declare function InningToJSON(value?: Inning | null): any;
478
+
479
+ interface LinescoreTeams {
480
+ away?: LinescoreTeam;
481
+ home?: LinescoreTeam;
482
+ }
483
+ declare function instanceOfLinescoreTeams(value: object): value is LinescoreTeams;
484
+ declare function LinescoreTeamsFromJSON(json: any): LinescoreTeams;
485
+ declare function LinescoreTeamsFromJSONTyped(json: any, ignoreDiscriminator: boolean): LinescoreTeams;
486
+ declare function LinescoreTeamsToJSON(value?: LinescoreTeams | null): any;
487
+
488
+ interface Linescore {
489
+ currentInning?: number;
490
+ currentInningOrdinal?: string;
491
+ inningState?: string;
492
+ inningHalf?: string;
493
+ isTopInning?: boolean;
494
+ scheduledInnings?: number;
495
+ innings?: Array<Inning>;
496
+ teams?: LinescoreTeams;
497
+ balls?: number;
498
+ strikes?: number;
499
+ outs?: number;
500
+ }
501
+ declare function instanceOfLinescore(value: object): value is Linescore;
502
+ declare function LinescoreFromJSON(json: any): Linescore;
503
+ declare function LinescoreFromJSONTyped(json: any, ignoreDiscriminator: boolean): Linescore;
504
+ declare function LinescoreToJSON(value?: Linescore | null): any;
505
+
457
506
  interface ScheduleDay {
458
507
  date?: string;
459
508
  totalItems?: number;
@@ -526,6 +575,9 @@ declare function TeamsToJSON(value?: Teams | null): any;
526
575
  interface GetAllSeasonsRequest {
527
576
  sportId: number;
528
577
  }
578
+ interface GetLinescoreRequest {
579
+ gamePk: number;
580
+ }
529
581
  interface GetScheduleRequest {
530
582
  sportId: number;
531
583
  teamId?: number;
@@ -554,6 +606,8 @@ interface GetTeamsRequest {
554
606
  declare class MlbApi extends BaseAPI {
555
607
  getAllSeasonsRaw(requestParameters: GetAllSeasonsRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<Seasons>>;
556
608
  getAllSeasons(requestParameters: GetAllSeasonsRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<Seasons>;
609
+ getLinescoreRaw(requestParameters: GetLinescoreRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<Linescore>>;
610
+ getLinescore(requestParameters: GetLinescoreRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<Linescore>;
557
611
  getScheduleRaw(requestParameters: GetScheduleRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<Schedule>>;
558
612
  getSchedule(requestParameters: GetScheduleRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<Schedule>;
559
613
  getSeasonRaw(requestParameters: GetSeasonRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<Seasons>>;
@@ -564,4 +618,4 @@ declare class MlbApi extends BaseAPI {
564
618
  getTeams(requestParameters: GetTeamsRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<Teams>;
565
619
  }
566
620
 
567
- export { type ApiResponse, BASE_PATH, BaseAPI, BlobApiResponse, COLLECTION_FORMATS, Configuration, type ConfigurationParameters, type Consume, DefaultConfig, type Division, DivisionFromJSON, DivisionFromJSONTyped, type DivisionStandings, DivisionStandingsFromJSON, DivisionStandingsFromJSONTyped, type DivisionStandingsList, DivisionStandingsListFromJSON, DivisionStandingsListFromJSONTyped, DivisionStandingsListToJSON, DivisionStandingsToJSON, DivisionToJSON, type ErrorContext, type FetchAPI, FetchError, type FetchParams, type Game, GameFromJSON, GameFromJSONTyped, type GameStatus, GameStatusCode, GameStatusCodeFromJSON, GameStatusCodeFromJSONTyped, GameStatusCodeToJSON, GameStatusFromJSON, GameStatusFromJSONTyped, GameStatusToJSON, type GameTeam, GameTeamFromJSON, GameTeamFromJSONTyped, GameTeamToJSON, type GameTeams, GameTeamsFromJSON, GameTeamsFromJSONTyped, GameTeamsToJSON, GameToJSON, GameType, GameTypeFromJSON, GameTypeFromJSONTyped, GameTypeToJSON, type GetAllSeasonsRequest, type GetScheduleRequest, type GetSeasonRequest, type GetStandingsRequest, type GetTeamsRequest, type HTTPBody, type HTTPHeaders, type HTTPMethod, type HTTPQuery, type HTTPRequestInit, type InitOverrideFunction, JSONApiResponse, type Json, type League, type LeagueDates, LeagueDatesFromJSON, LeagueDatesFromJSONTyped, LeagueDatesToJSON, LeagueFromJSON, LeagueFromJSONTyped, type LeagueRecord, LeagueRecordFromJSON, LeagueRecordFromJSONTyped, LeagueRecordToJSON, LeagueToJSON, type Middleware, MlbApi, type ModelPropertyNaming, type RequestContext, type RequestOpts, RequiredError, type ResponseContext, ResponseError, type ResponseTransformer, type Schedule, type ScheduleDay, ScheduleDayFromJSON, ScheduleDayFromJSONTyped, ScheduleDayToJSON, ScheduleFromJSON, ScheduleFromJSONTyped, ScheduleToJSON, type Season, SeasonFromJSON, SeasonFromJSONTyped, SeasonToJSON, type Seasons, SeasonsFromJSON, SeasonsFromJSONTyped, SeasonsToJSON, type Sport, SportFromJSON, SportFromJSONTyped, SportToJSON, type Streak, StreakFromJSON, StreakFromJSONTyped, StreakStreakTypeEnum, StreakToJSON, type Team, TeamFromJSON, TeamFromJSONTyped, type TeamRecord, TeamRecordFromJSON, TeamRecordFromJSONTyped, TeamRecordToJSON, TeamToJSON, type Teams, TeamsFromJSON, TeamsFromJSONTyped, TeamsToJSON, TextApiResponse, type Venue, VenueFromJSON, VenueFromJSONTyped, VenueToJSON, VoidApiResponse, canConsumeForm, instanceOfDivision, instanceOfDivisionStandings, instanceOfDivisionStandingsList, instanceOfGame, instanceOfGameStatus, instanceOfGameStatusCode, instanceOfGameTeam, instanceOfGameTeams, instanceOfGameType, instanceOfLeague, instanceOfLeagueDates, instanceOfLeagueRecord, instanceOfSchedule, instanceOfScheduleDay, instanceOfSeason, instanceOfSeasons, instanceOfSport, instanceOfStreak, instanceOfTeam, instanceOfTeamRecord, instanceOfTeams, instanceOfVenue, mapValues, querystring };
621
+ export { type ApiResponse, BASE_PATH, BaseAPI, BlobApiResponse, COLLECTION_FORMATS, Configuration, type ConfigurationParameters, type Consume, DefaultConfig, type Division, DivisionFromJSON, DivisionFromJSONTyped, type DivisionStandings, DivisionStandingsFromJSON, DivisionStandingsFromJSONTyped, type DivisionStandingsList, DivisionStandingsListFromJSON, DivisionStandingsListFromJSONTyped, DivisionStandingsListToJSON, DivisionStandingsToJSON, DivisionToJSON, type ErrorContext, type FetchAPI, FetchError, type FetchParams, type Game, GameFromJSON, GameFromJSONTyped, type GameStatus, GameStatusCode, GameStatusCodeFromJSON, GameStatusCodeFromJSONTyped, GameStatusCodeToJSON, GameStatusFromJSON, GameStatusFromJSONTyped, GameStatusToJSON, type GameTeam, GameTeamFromJSON, GameTeamFromJSONTyped, GameTeamToJSON, type GameTeams, GameTeamsFromJSON, GameTeamsFromJSONTyped, GameTeamsToJSON, GameToJSON, GameType, GameTypeFromJSON, GameTypeFromJSONTyped, GameTypeToJSON, type GetAllSeasonsRequest, type GetLinescoreRequest, type GetScheduleRequest, type GetSeasonRequest, type GetStandingsRequest, type GetTeamsRequest, type HTTPBody, type HTTPHeaders, type HTTPMethod, type HTTPQuery, type HTTPRequestInit, type InitOverrideFunction, type Inning, InningFromJSON, InningFromJSONTyped, InningToJSON, JSONApiResponse, type Json, type League, type LeagueDates, LeagueDatesFromJSON, LeagueDatesFromJSONTyped, LeagueDatesToJSON, LeagueFromJSON, LeagueFromJSONTyped, type LeagueRecord, LeagueRecordFromJSON, LeagueRecordFromJSONTyped, LeagueRecordToJSON, LeagueToJSON, type Linescore, LinescoreFromJSON, LinescoreFromJSONTyped, type LinescoreTeam, LinescoreTeamFromJSON, LinescoreTeamFromJSONTyped, LinescoreTeamToJSON, type LinescoreTeams, LinescoreTeamsFromJSON, LinescoreTeamsFromJSONTyped, LinescoreTeamsToJSON, LinescoreToJSON, type Middleware, MlbApi, type ModelPropertyNaming, type RequestContext, type RequestOpts, RequiredError, type ResponseContext, ResponseError, type ResponseTransformer, type Schedule, type ScheduleDay, ScheduleDayFromJSON, ScheduleDayFromJSONTyped, ScheduleDayToJSON, ScheduleFromJSON, ScheduleFromJSONTyped, ScheduleToJSON, type Season, SeasonFromJSON, SeasonFromJSONTyped, SeasonToJSON, type Seasons, SeasonsFromJSON, SeasonsFromJSONTyped, SeasonsToJSON, type Sport, SportFromJSON, SportFromJSONTyped, SportToJSON, type Streak, StreakFromJSON, StreakFromJSONTyped, StreakStreakTypeEnum, StreakToJSON, type Team, TeamFromJSON, TeamFromJSONTyped, type TeamRecord, TeamRecordFromJSON, TeamRecordFromJSONTyped, TeamRecordToJSON, TeamToJSON, type Teams, TeamsFromJSON, TeamsFromJSONTyped, TeamsToJSON, TextApiResponse, type Venue, VenueFromJSON, VenueFromJSONTyped, VenueToJSON, VoidApiResponse, canConsumeForm, instanceOfDivision, instanceOfDivisionStandings, instanceOfDivisionStandingsList, instanceOfGame, instanceOfGameStatus, instanceOfGameStatusCode, instanceOfGameTeam, instanceOfGameTeams, instanceOfGameType, instanceOfInning, instanceOfLeague, instanceOfLeagueDates, instanceOfLeagueRecord, instanceOfLinescore, instanceOfLinescoreTeam, instanceOfLinescoreTeams, instanceOfSchedule, instanceOfScheduleDay, instanceOfSeason, instanceOfSeasons, instanceOfSport, instanceOfStreak, instanceOfTeam, instanceOfTeamRecord, instanceOfTeams, instanceOfVenue, mapValues, querystring };
package/dist/index.d.ts CHANGED
@@ -454,6 +454,55 @@ declare function GameFromJSON(json: any): Game;
454
454
  declare function GameFromJSONTyped(json: any, ignoreDiscriminator: boolean): Game;
455
455
  declare function GameToJSON(value?: Game | null): any;
456
456
 
457
+ interface LinescoreTeam {
458
+ runs?: number;
459
+ hits?: number;
460
+ errors?: number;
461
+ leftOnBase?: number;
462
+ }
463
+ declare function instanceOfLinescoreTeam(value: object): value is LinescoreTeam;
464
+ declare function LinescoreTeamFromJSON(json: any): LinescoreTeam;
465
+ declare function LinescoreTeamFromJSONTyped(json: any, ignoreDiscriminator: boolean): LinescoreTeam;
466
+ declare function LinescoreTeamToJSON(value?: LinescoreTeam | null): any;
467
+
468
+ interface Inning {
469
+ num?: number;
470
+ ordinalNum?: string;
471
+ home?: LinescoreTeam;
472
+ away?: LinescoreTeam;
473
+ }
474
+ declare function instanceOfInning(value: object): value is Inning;
475
+ declare function InningFromJSON(json: any): Inning;
476
+ declare function InningFromJSONTyped(json: any, ignoreDiscriminator: boolean): Inning;
477
+ declare function InningToJSON(value?: Inning | null): any;
478
+
479
+ interface LinescoreTeams {
480
+ away?: LinescoreTeam;
481
+ home?: LinescoreTeam;
482
+ }
483
+ declare function instanceOfLinescoreTeams(value: object): value is LinescoreTeams;
484
+ declare function LinescoreTeamsFromJSON(json: any): LinescoreTeams;
485
+ declare function LinescoreTeamsFromJSONTyped(json: any, ignoreDiscriminator: boolean): LinescoreTeams;
486
+ declare function LinescoreTeamsToJSON(value?: LinescoreTeams | null): any;
487
+
488
+ interface Linescore {
489
+ currentInning?: number;
490
+ currentInningOrdinal?: string;
491
+ inningState?: string;
492
+ inningHalf?: string;
493
+ isTopInning?: boolean;
494
+ scheduledInnings?: number;
495
+ innings?: Array<Inning>;
496
+ teams?: LinescoreTeams;
497
+ balls?: number;
498
+ strikes?: number;
499
+ outs?: number;
500
+ }
501
+ declare function instanceOfLinescore(value: object): value is Linescore;
502
+ declare function LinescoreFromJSON(json: any): Linescore;
503
+ declare function LinescoreFromJSONTyped(json: any, ignoreDiscriminator: boolean): Linescore;
504
+ declare function LinescoreToJSON(value?: Linescore | null): any;
505
+
457
506
  interface ScheduleDay {
458
507
  date?: string;
459
508
  totalItems?: number;
@@ -526,6 +575,9 @@ declare function TeamsToJSON(value?: Teams | null): any;
526
575
  interface GetAllSeasonsRequest {
527
576
  sportId: number;
528
577
  }
578
+ interface GetLinescoreRequest {
579
+ gamePk: number;
580
+ }
529
581
  interface GetScheduleRequest {
530
582
  sportId: number;
531
583
  teamId?: number;
@@ -554,6 +606,8 @@ interface GetTeamsRequest {
554
606
  declare class MlbApi extends BaseAPI {
555
607
  getAllSeasonsRaw(requestParameters: GetAllSeasonsRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<Seasons>>;
556
608
  getAllSeasons(requestParameters: GetAllSeasonsRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<Seasons>;
609
+ getLinescoreRaw(requestParameters: GetLinescoreRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<Linescore>>;
610
+ getLinescore(requestParameters: GetLinescoreRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<Linescore>;
557
611
  getScheduleRaw(requestParameters: GetScheduleRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<Schedule>>;
558
612
  getSchedule(requestParameters: GetScheduleRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<Schedule>;
559
613
  getSeasonRaw(requestParameters: GetSeasonRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<Seasons>>;
@@ -564,4 +618,4 @@ declare class MlbApi extends BaseAPI {
564
618
  getTeams(requestParameters: GetTeamsRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<Teams>;
565
619
  }
566
620
 
567
- export { type ApiResponse, BASE_PATH, BaseAPI, BlobApiResponse, COLLECTION_FORMATS, Configuration, type ConfigurationParameters, type Consume, DefaultConfig, type Division, DivisionFromJSON, DivisionFromJSONTyped, type DivisionStandings, DivisionStandingsFromJSON, DivisionStandingsFromJSONTyped, type DivisionStandingsList, DivisionStandingsListFromJSON, DivisionStandingsListFromJSONTyped, DivisionStandingsListToJSON, DivisionStandingsToJSON, DivisionToJSON, type ErrorContext, type FetchAPI, FetchError, type FetchParams, type Game, GameFromJSON, GameFromJSONTyped, type GameStatus, GameStatusCode, GameStatusCodeFromJSON, GameStatusCodeFromJSONTyped, GameStatusCodeToJSON, GameStatusFromJSON, GameStatusFromJSONTyped, GameStatusToJSON, type GameTeam, GameTeamFromJSON, GameTeamFromJSONTyped, GameTeamToJSON, type GameTeams, GameTeamsFromJSON, GameTeamsFromJSONTyped, GameTeamsToJSON, GameToJSON, GameType, GameTypeFromJSON, GameTypeFromJSONTyped, GameTypeToJSON, type GetAllSeasonsRequest, type GetScheduleRequest, type GetSeasonRequest, type GetStandingsRequest, type GetTeamsRequest, type HTTPBody, type HTTPHeaders, type HTTPMethod, type HTTPQuery, type HTTPRequestInit, type InitOverrideFunction, JSONApiResponse, type Json, type League, type LeagueDates, LeagueDatesFromJSON, LeagueDatesFromJSONTyped, LeagueDatesToJSON, LeagueFromJSON, LeagueFromJSONTyped, type LeagueRecord, LeagueRecordFromJSON, LeagueRecordFromJSONTyped, LeagueRecordToJSON, LeagueToJSON, type Middleware, MlbApi, type ModelPropertyNaming, type RequestContext, type RequestOpts, RequiredError, type ResponseContext, ResponseError, type ResponseTransformer, type Schedule, type ScheduleDay, ScheduleDayFromJSON, ScheduleDayFromJSONTyped, ScheduleDayToJSON, ScheduleFromJSON, ScheduleFromJSONTyped, ScheduleToJSON, type Season, SeasonFromJSON, SeasonFromJSONTyped, SeasonToJSON, type Seasons, SeasonsFromJSON, SeasonsFromJSONTyped, SeasonsToJSON, type Sport, SportFromJSON, SportFromJSONTyped, SportToJSON, type Streak, StreakFromJSON, StreakFromJSONTyped, StreakStreakTypeEnum, StreakToJSON, type Team, TeamFromJSON, TeamFromJSONTyped, type TeamRecord, TeamRecordFromJSON, TeamRecordFromJSONTyped, TeamRecordToJSON, TeamToJSON, type Teams, TeamsFromJSON, TeamsFromJSONTyped, TeamsToJSON, TextApiResponse, type Venue, VenueFromJSON, VenueFromJSONTyped, VenueToJSON, VoidApiResponse, canConsumeForm, instanceOfDivision, instanceOfDivisionStandings, instanceOfDivisionStandingsList, instanceOfGame, instanceOfGameStatus, instanceOfGameStatusCode, instanceOfGameTeam, instanceOfGameTeams, instanceOfGameType, instanceOfLeague, instanceOfLeagueDates, instanceOfLeagueRecord, instanceOfSchedule, instanceOfScheduleDay, instanceOfSeason, instanceOfSeasons, instanceOfSport, instanceOfStreak, instanceOfTeam, instanceOfTeamRecord, instanceOfTeams, instanceOfVenue, mapValues, querystring };
621
+ export { type ApiResponse, BASE_PATH, BaseAPI, BlobApiResponse, COLLECTION_FORMATS, Configuration, type ConfigurationParameters, type Consume, DefaultConfig, type Division, DivisionFromJSON, DivisionFromJSONTyped, type DivisionStandings, DivisionStandingsFromJSON, DivisionStandingsFromJSONTyped, type DivisionStandingsList, DivisionStandingsListFromJSON, DivisionStandingsListFromJSONTyped, DivisionStandingsListToJSON, DivisionStandingsToJSON, DivisionToJSON, type ErrorContext, type FetchAPI, FetchError, type FetchParams, type Game, GameFromJSON, GameFromJSONTyped, type GameStatus, GameStatusCode, GameStatusCodeFromJSON, GameStatusCodeFromJSONTyped, GameStatusCodeToJSON, GameStatusFromJSON, GameStatusFromJSONTyped, GameStatusToJSON, type GameTeam, GameTeamFromJSON, GameTeamFromJSONTyped, GameTeamToJSON, type GameTeams, GameTeamsFromJSON, GameTeamsFromJSONTyped, GameTeamsToJSON, GameToJSON, GameType, GameTypeFromJSON, GameTypeFromJSONTyped, GameTypeToJSON, type GetAllSeasonsRequest, type GetLinescoreRequest, type GetScheduleRequest, type GetSeasonRequest, type GetStandingsRequest, type GetTeamsRequest, type HTTPBody, type HTTPHeaders, type HTTPMethod, type HTTPQuery, type HTTPRequestInit, type InitOverrideFunction, type Inning, InningFromJSON, InningFromJSONTyped, InningToJSON, JSONApiResponse, type Json, type League, type LeagueDates, LeagueDatesFromJSON, LeagueDatesFromJSONTyped, LeagueDatesToJSON, LeagueFromJSON, LeagueFromJSONTyped, type LeagueRecord, LeagueRecordFromJSON, LeagueRecordFromJSONTyped, LeagueRecordToJSON, LeagueToJSON, type Linescore, LinescoreFromJSON, LinescoreFromJSONTyped, type LinescoreTeam, LinescoreTeamFromJSON, LinescoreTeamFromJSONTyped, LinescoreTeamToJSON, type LinescoreTeams, LinescoreTeamsFromJSON, LinescoreTeamsFromJSONTyped, LinescoreTeamsToJSON, LinescoreToJSON, type Middleware, MlbApi, type ModelPropertyNaming, type RequestContext, type RequestOpts, RequiredError, type ResponseContext, ResponseError, type ResponseTransformer, type Schedule, type ScheduleDay, ScheduleDayFromJSON, ScheduleDayFromJSONTyped, ScheduleDayToJSON, ScheduleFromJSON, ScheduleFromJSONTyped, ScheduleToJSON, type Season, SeasonFromJSON, SeasonFromJSONTyped, SeasonToJSON, type Seasons, SeasonsFromJSON, SeasonsFromJSONTyped, SeasonsToJSON, type Sport, SportFromJSON, SportFromJSONTyped, SportToJSON, type Streak, StreakFromJSON, StreakFromJSONTyped, StreakStreakTypeEnum, StreakToJSON, type Team, TeamFromJSON, TeamFromJSONTyped, type TeamRecord, TeamRecordFromJSON, TeamRecordFromJSONTyped, TeamRecordToJSON, TeamToJSON, type Teams, TeamsFromJSON, TeamsFromJSONTyped, TeamsToJSON, TextApiResponse, type Venue, VenueFromJSON, VenueFromJSONTyped, VenueToJSON, VoidApiResponse, canConsumeForm, instanceOfDivision, instanceOfDivisionStandings, instanceOfDivisionStandingsList, instanceOfGame, instanceOfGameStatus, instanceOfGameStatusCode, instanceOfGameTeam, instanceOfGameTeams, instanceOfGameType, instanceOfInning, instanceOfLeague, instanceOfLeagueDates, instanceOfLeagueRecord, instanceOfLinescore, instanceOfLinescoreTeam, instanceOfLinescoreTeams, instanceOfSchedule, instanceOfScheduleDay, instanceOfSeason, instanceOfSeasons, instanceOfSport, instanceOfStreak, instanceOfTeam, instanceOfTeamRecord, instanceOfTeams, instanceOfVenue, mapValues, querystring };
package/dist/index.js CHANGED
@@ -93,6 +93,9 @@ __export(src_exports, {
93
93
  GameTypeFromJSON: () => GameTypeFromJSON,
94
94
  GameTypeFromJSONTyped: () => GameTypeFromJSONTyped,
95
95
  GameTypeToJSON: () => GameTypeToJSON,
96
+ InningFromJSON: () => InningFromJSON,
97
+ InningFromJSONTyped: () => InningFromJSONTyped,
98
+ InningToJSON: () => InningToJSON,
96
99
  JSONApiResponse: () => JSONApiResponse,
97
100
  LeagueDatesFromJSON: () => LeagueDatesFromJSON,
98
101
  LeagueDatesFromJSONTyped: () => LeagueDatesFromJSONTyped,
@@ -103,6 +106,15 @@ __export(src_exports, {
103
106
  LeagueRecordFromJSONTyped: () => LeagueRecordFromJSONTyped,
104
107
  LeagueRecordToJSON: () => LeagueRecordToJSON,
105
108
  LeagueToJSON: () => LeagueToJSON,
109
+ LinescoreFromJSON: () => LinescoreFromJSON,
110
+ LinescoreFromJSONTyped: () => LinescoreFromJSONTyped,
111
+ LinescoreTeamFromJSON: () => LinescoreTeamFromJSON,
112
+ LinescoreTeamFromJSONTyped: () => LinescoreTeamFromJSONTyped,
113
+ LinescoreTeamToJSON: () => LinescoreTeamToJSON,
114
+ LinescoreTeamsFromJSON: () => LinescoreTeamsFromJSON,
115
+ LinescoreTeamsFromJSONTyped: () => LinescoreTeamsFromJSONTyped,
116
+ LinescoreTeamsToJSON: () => LinescoreTeamsToJSON,
117
+ LinescoreToJSON: () => LinescoreToJSON,
106
118
  MlbApi: () => MlbApi,
107
119
  RequiredError: () => RequiredError,
108
120
  ResponseError: () => ResponseError,
@@ -149,9 +161,13 @@ __export(src_exports, {
149
161
  instanceOfGameTeam: () => instanceOfGameTeam,
150
162
  instanceOfGameTeams: () => instanceOfGameTeams,
151
163
  instanceOfGameType: () => instanceOfGameType,
164
+ instanceOfInning: () => instanceOfInning,
152
165
  instanceOfLeague: () => instanceOfLeague,
153
166
  instanceOfLeagueDates: () => instanceOfLeagueDates,
154
167
  instanceOfLeagueRecord: () => instanceOfLeagueRecord,
168
+ instanceOfLinescore: () => instanceOfLinescore,
169
+ instanceOfLinescoreTeam: () => instanceOfLinescoreTeam,
170
+ instanceOfLinescoreTeams: () => instanceOfLinescoreTeams,
155
171
  instanceOfSchedule: () => instanceOfSchedule,
156
172
  instanceOfScheduleDay: () => instanceOfScheduleDay,
157
173
  instanceOfSeason: () => instanceOfSeason,
@@ -1223,6 +1239,136 @@ function GameToJSON(value) {
1223
1239
  };
1224
1240
  }
1225
1241
 
1242
+ // src/models/LinescoreTeam.ts
1243
+ function instanceOfLinescoreTeam(value) {
1244
+ return true;
1245
+ }
1246
+ function LinescoreTeamFromJSON(json) {
1247
+ return LinescoreTeamFromJSONTyped(json, false);
1248
+ }
1249
+ function LinescoreTeamFromJSONTyped(json, ignoreDiscriminator) {
1250
+ if (json == null) {
1251
+ return json;
1252
+ }
1253
+ return {
1254
+ "runs": json["runs"] == null ? void 0 : json["runs"],
1255
+ "hits": json["hits"] == null ? void 0 : json["hits"],
1256
+ "errors": json["errors"] == null ? void 0 : json["errors"],
1257
+ "leftOnBase": json["leftOnBase"] == null ? void 0 : json["leftOnBase"]
1258
+ };
1259
+ }
1260
+ function LinescoreTeamToJSON(value) {
1261
+ if (value == null) {
1262
+ return value;
1263
+ }
1264
+ return {
1265
+ "runs": value["runs"],
1266
+ "hits": value["hits"],
1267
+ "errors": value["errors"],
1268
+ "leftOnBase": value["leftOnBase"]
1269
+ };
1270
+ }
1271
+
1272
+ // src/models/Inning.ts
1273
+ function instanceOfInning(value) {
1274
+ return true;
1275
+ }
1276
+ function InningFromJSON(json) {
1277
+ return InningFromJSONTyped(json, false);
1278
+ }
1279
+ function InningFromJSONTyped(json, ignoreDiscriminator) {
1280
+ if (json == null) {
1281
+ return json;
1282
+ }
1283
+ return {
1284
+ "num": json["num"] == null ? void 0 : json["num"],
1285
+ "ordinalNum": json["ordinalNum"] == null ? void 0 : json["ordinalNum"],
1286
+ "home": json["home"] == null ? void 0 : LinescoreTeamFromJSON(json["home"]),
1287
+ "away": json["away"] == null ? void 0 : LinescoreTeamFromJSON(json["away"])
1288
+ };
1289
+ }
1290
+ function InningToJSON(value) {
1291
+ if (value == null) {
1292
+ return value;
1293
+ }
1294
+ return {
1295
+ "num": value["num"],
1296
+ "ordinalNum": value["ordinalNum"],
1297
+ "home": LinescoreTeamToJSON(value["home"]),
1298
+ "away": LinescoreTeamToJSON(value["away"])
1299
+ };
1300
+ }
1301
+
1302
+ // src/models/LinescoreTeams.ts
1303
+ function instanceOfLinescoreTeams(value) {
1304
+ return true;
1305
+ }
1306
+ function LinescoreTeamsFromJSON(json) {
1307
+ return LinescoreTeamsFromJSONTyped(json, false);
1308
+ }
1309
+ function LinescoreTeamsFromJSONTyped(json, ignoreDiscriminator) {
1310
+ if (json == null) {
1311
+ return json;
1312
+ }
1313
+ return {
1314
+ "away": json["away"] == null ? void 0 : LinescoreTeamFromJSON(json["away"]),
1315
+ "home": json["home"] == null ? void 0 : LinescoreTeamFromJSON(json["home"])
1316
+ };
1317
+ }
1318
+ function LinescoreTeamsToJSON(value) {
1319
+ if (value == null) {
1320
+ return value;
1321
+ }
1322
+ return {
1323
+ "away": LinescoreTeamToJSON(value["away"]),
1324
+ "home": LinescoreTeamToJSON(value["home"])
1325
+ };
1326
+ }
1327
+
1328
+ // src/models/Linescore.ts
1329
+ function instanceOfLinescore(value) {
1330
+ return true;
1331
+ }
1332
+ function LinescoreFromJSON(json) {
1333
+ return LinescoreFromJSONTyped(json, false);
1334
+ }
1335
+ function LinescoreFromJSONTyped(json, ignoreDiscriminator) {
1336
+ if (json == null) {
1337
+ return json;
1338
+ }
1339
+ return {
1340
+ "currentInning": json["currentInning"] == null ? void 0 : json["currentInning"],
1341
+ "currentInningOrdinal": json["currentInningOrdinal"] == null ? void 0 : json["currentInningOrdinal"],
1342
+ "inningState": json["inningState"] == null ? void 0 : json["inningState"],
1343
+ "inningHalf": json["inningHalf"] == null ? void 0 : json["inningHalf"],
1344
+ "isTopInning": json["isTopInning"] == null ? void 0 : json["isTopInning"],
1345
+ "scheduledInnings": json["scheduledInnings"] == null ? void 0 : json["scheduledInnings"],
1346
+ "innings": json["innings"] == null ? void 0 : json["innings"].map(InningFromJSON),
1347
+ "teams": json["teams"] == null ? void 0 : LinescoreTeamsFromJSON(json["teams"]),
1348
+ "balls": json["balls"] == null ? void 0 : json["balls"],
1349
+ "strikes": json["strikes"] == null ? void 0 : json["strikes"],
1350
+ "outs": json["outs"] == null ? void 0 : json["outs"]
1351
+ };
1352
+ }
1353
+ function LinescoreToJSON(value) {
1354
+ if (value == null) {
1355
+ return value;
1356
+ }
1357
+ return {
1358
+ "currentInning": value["currentInning"],
1359
+ "currentInningOrdinal": value["currentInningOrdinal"],
1360
+ "inningState": value["inningState"],
1361
+ "inningHalf": value["inningHalf"],
1362
+ "isTopInning": value["isTopInning"],
1363
+ "scheduledInnings": value["scheduledInnings"],
1364
+ "innings": value["innings"] == null ? void 0 : value["innings"].map(InningToJSON),
1365
+ "teams": LinescoreTeamsToJSON(value["teams"]),
1366
+ "balls": value["balls"],
1367
+ "strikes": value["strikes"],
1368
+ "outs": value["outs"]
1369
+ };
1370
+ }
1371
+
1226
1372
  // src/models/ScheduleDay.ts
1227
1373
  function instanceOfScheduleDay(value) {
1228
1374
  if (!("games" in value) || value["games"] === void 0) return false;
@@ -1450,6 +1596,39 @@ var MlbApi = class extends BaseAPI {
1450
1596
  return yield response.value();
1451
1597
  });
1452
1598
  }
1599
+ /**
1600
+ * Returns Linescore
1601
+ * Retrieves linescore
1602
+ */
1603
+ getLinescoreRaw(requestParameters, initOverrides) {
1604
+ return __async(this, null, function* () {
1605
+ if (requestParameters["gamePk"] == null) {
1606
+ throw new RequiredError(
1607
+ "gamePk",
1608
+ 'Required parameter "gamePk" was null or undefined when calling getLinescore().'
1609
+ );
1610
+ }
1611
+ const queryParameters = {};
1612
+ const headerParameters = {};
1613
+ const response = yield this.request({
1614
+ path: `/v1/game/{gamePk}/linescore`.replace(`{${"gamePk"}}`, encodeURIComponent(String(requestParameters["gamePk"]))),
1615
+ method: "GET",
1616
+ headers: headerParameters,
1617
+ query: queryParameters
1618
+ }, initOverrides);
1619
+ return new JSONApiResponse(response, (jsonValue) => LinescoreFromJSON(jsonValue));
1620
+ });
1621
+ }
1622
+ /**
1623
+ * Returns Linescore
1624
+ * Retrieves linescore
1625
+ */
1626
+ getLinescore(requestParameters, initOverrides) {
1627
+ return __async(this, null, function* () {
1628
+ const response = yield this.getLinescoreRaw(requestParameters, initOverrides);
1629
+ return yield response.value();
1630
+ });
1631
+ }
1453
1632
  /**
1454
1633
  * Returns Schedule
1455
1634
  * Retrieves schedule
@@ -1690,6 +1869,9 @@ var MlbApi = class extends BaseAPI {
1690
1869
  GameTypeFromJSON,
1691
1870
  GameTypeFromJSONTyped,
1692
1871
  GameTypeToJSON,
1872
+ InningFromJSON,
1873
+ InningFromJSONTyped,
1874
+ InningToJSON,
1693
1875
  JSONApiResponse,
1694
1876
  LeagueDatesFromJSON,
1695
1877
  LeagueDatesFromJSONTyped,
@@ -1700,6 +1882,15 @@ var MlbApi = class extends BaseAPI {
1700
1882
  LeagueRecordFromJSONTyped,
1701
1883
  LeagueRecordToJSON,
1702
1884
  LeagueToJSON,
1885
+ LinescoreFromJSON,
1886
+ LinescoreFromJSONTyped,
1887
+ LinescoreTeamFromJSON,
1888
+ LinescoreTeamFromJSONTyped,
1889
+ LinescoreTeamToJSON,
1890
+ LinescoreTeamsFromJSON,
1891
+ LinescoreTeamsFromJSONTyped,
1892
+ LinescoreTeamsToJSON,
1893
+ LinescoreToJSON,
1703
1894
  MlbApi,
1704
1895
  RequiredError,
1705
1896
  ResponseError,
@@ -1746,9 +1937,13 @@ var MlbApi = class extends BaseAPI {
1746
1937
  instanceOfGameTeam,
1747
1938
  instanceOfGameTeams,
1748
1939
  instanceOfGameType,
1940
+ instanceOfInning,
1749
1941
  instanceOfLeague,
1750
1942
  instanceOfLeagueDates,
1751
1943
  instanceOfLeagueRecord,
1944
+ instanceOfLinescore,
1945
+ instanceOfLinescoreTeam,
1946
+ instanceOfLinescoreTeams,
1752
1947
  instanceOfSchedule,
1753
1948
  instanceOfScheduleDay,
1754
1949
  instanceOfSeason,
package/dist/index.mjs CHANGED
@@ -1094,6 +1094,136 @@ function GameToJSON(value) {
1094
1094
  };
1095
1095
  }
1096
1096
 
1097
+ // src/models/LinescoreTeam.ts
1098
+ function instanceOfLinescoreTeam(value) {
1099
+ return true;
1100
+ }
1101
+ function LinescoreTeamFromJSON(json) {
1102
+ return LinescoreTeamFromJSONTyped(json, false);
1103
+ }
1104
+ function LinescoreTeamFromJSONTyped(json, ignoreDiscriminator) {
1105
+ if (json == null) {
1106
+ return json;
1107
+ }
1108
+ return {
1109
+ "runs": json["runs"] == null ? void 0 : json["runs"],
1110
+ "hits": json["hits"] == null ? void 0 : json["hits"],
1111
+ "errors": json["errors"] == null ? void 0 : json["errors"],
1112
+ "leftOnBase": json["leftOnBase"] == null ? void 0 : json["leftOnBase"]
1113
+ };
1114
+ }
1115
+ function LinescoreTeamToJSON(value) {
1116
+ if (value == null) {
1117
+ return value;
1118
+ }
1119
+ return {
1120
+ "runs": value["runs"],
1121
+ "hits": value["hits"],
1122
+ "errors": value["errors"],
1123
+ "leftOnBase": value["leftOnBase"]
1124
+ };
1125
+ }
1126
+
1127
+ // src/models/Inning.ts
1128
+ function instanceOfInning(value) {
1129
+ return true;
1130
+ }
1131
+ function InningFromJSON(json) {
1132
+ return InningFromJSONTyped(json, false);
1133
+ }
1134
+ function InningFromJSONTyped(json, ignoreDiscriminator) {
1135
+ if (json == null) {
1136
+ return json;
1137
+ }
1138
+ return {
1139
+ "num": json["num"] == null ? void 0 : json["num"],
1140
+ "ordinalNum": json["ordinalNum"] == null ? void 0 : json["ordinalNum"],
1141
+ "home": json["home"] == null ? void 0 : LinescoreTeamFromJSON(json["home"]),
1142
+ "away": json["away"] == null ? void 0 : LinescoreTeamFromJSON(json["away"])
1143
+ };
1144
+ }
1145
+ function InningToJSON(value) {
1146
+ if (value == null) {
1147
+ return value;
1148
+ }
1149
+ return {
1150
+ "num": value["num"],
1151
+ "ordinalNum": value["ordinalNum"],
1152
+ "home": LinescoreTeamToJSON(value["home"]),
1153
+ "away": LinescoreTeamToJSON(value["away"])
1154
+ };
1155
+ }
1156
+
1157
+ // src/models/LinescoreTeams.ts
1158
+ function instanceOfLinescoreTeams(value) {
1159
+ return true;
1160
+ }
1161
+ function LinescoreTeamsFromJSON(json) {
1162
+ return LinescoreTeamsFromJSONTyped(json, false);
1163
+ }
1164
+ function LinescoreTeamsFromJSONTyped(json, ignoreDiscriminator) {
1165
+ if (json == null) {
1166
+ return json;
1167
+ }
1168
+ return {
1169
+ "away": json["away"] == null ? void 0 : LinescoreTeamFromJSON(json["away"]),
1170
+ "home": json["home"] == null ? void 0 : LinescoreTeamFromJSON(json["home"])
1171
+ };
1172
+ }
1173
+ function LinescoreTeamsToJSON(value) {
1174
+ if (value == null) {
1175
+ return value;
1176
+ }
1177
+ return {
1178
+ "away": LinescoreTeamToJSON(value["away"]),
1179
+ "home": LinescoreTeamToJSON(value["home"])
1180
+ };
1181
+ }
1182
+
1183
+ // src/models/Linescore.ts
1184
+ function instanceOfLinescore(value) {
1185
+ return true;
1186
+ }
1187
+ function LinescoreFromJSON(json) {
1188
+ return LinescoreFromJSONTyped(json, false);
1189
+ }
1190
+ function LinescoreFromJSONTyped(json, ignoreDiscriminator) {
1191
+ if (json == null) {
1192
+ return json;
1193
+ }
1194
+ return {
1195
+ "currentInning": json["currentInning"] == null ? void 0 : json["currentInning"],
1196
+ "currentInningOrdinal": json["currentInningOrdinal"] == null ? void 0 : json["currentInningOrdinal"],
1197
+ "inningState": json["inningState"] == null ? void 0 : json["inningState"],
1198
+ "inningHalf": json["inningHalf"] == null ? void 0 : json["inningHalf"],
1199
+ "isTopInning": json["isTopInning"] == null ? void 0 : json["isTopInning"],
1200
+ "scheduledInnings": json["scheduledInnings"] == null ? void 0 : json["scheduledInnings"],
1201
+ "innings": json["innings"] == null ? void 0 : json["innings"].map(InningFromJSON),
1202
+ "teams": json["teams"] == null ? void 0 : LinescoreTeamsFromJSON(json["teams"]),
1203
+ "balls": json["balls"] == null ? void 0 : json["balls"],
1204
+ "strikes": json["strikes"] == null ? void 0 : json["strikes"],
1205
+ "outs": json["outs"] == null ? void 0 : json["outs"]
1206
+ };
1207
+ }
1208
+ function LinescoreToJSON(value) {
1209
+ if (value == null) {
1210
+ return value;
1211
+ }
1212
+ return {
1213
+ "currentInning": value["currentInning"],
1214
+ "currentInningOrdinal": value["currentInningOrdinal"],
1215
+ "inningState": value["inningState"],
1216
+ "inningHalf": value["inningHalf"],
1217
+ "isTopInning": value["isTopInning"],
1218
+ "scheduledInnings": value["scheduledInnings"],
1219
+ "innings": value["innings"] == null ? void 0 : value["innings"].map(InningToJSON),
1220
+ "teams": LinescoreTeamsToJSON(value["teams"]),
1221
+ "balls": value["balls"],
1222
+ "strikes": value["strikes"],
1223
+ "outs": value["outs"]
1224
+ };
1225
+ }
1226
+
1097
1227
  // src/models/ScheduleDay.ts
1098
1228
  function instanceOfScheduleDay(value) {
1099
1229
  if (!("games" in value) || value["games"] === void 0) return false;
@@ -1321,6 +1451,39 @@ var MlbApi = class extends BaseAPI {
1321
1451
  return yield response.value();
1322
1452
  });
1323
1453
  }
1454
+ /**
1455
+ * Returns Linescore
1456
+ * Retrieves linescore
1457
+ */
1458
+ getLinescoreRaw(requestParameters, initOverrides) {
1459
+ return __async(this, null, function* () {
1460
+ if (requestParameters["gamePk"] == null) {
1461
+ throw new RequiredError(
1462
+ "gamePk",
1463
+ 'Required parameter "gamePk" was null or undefined when calling getLinescore().'
1464
+ );
1465
+ }
1466
+ const queryParameters = {};
1467
+ const headerParameters = {};
1468
+ const response = yield this.request({
1469
+ path: `/v1/game/{gamePk}/linescore`.replace(`{${"gamePk"}}`, encodeURIComponent(String(requestParameters["gamePk"]))),
1470
+ method: "GET",
1471
+ headers: headerParameters,
1472
+ query: queryParameters
1473
+ }, initOverrides);
1474
+ return new JSONApiResponse(response, (jsonValue) => LinescoreFromJSON(jsonValue));
1475
+ });
1476
+ }
1477
+ /**
1478
+ * Returns Linescore
1479
+ * Retrieves linescore
1480
+ */
1481
+ getLinescore(requestParameters, initOverrides) {
1482
+ return __async(this, null, function* () {
1483
+ const response = yield this.getLinescoreRaw(requestParameters, initOverrides);
1484
+ return yield response.value();
1485
+ });
1486
+ }
1324
1487
  /**
1325
1488
  * Returns Schedule
1326
1489
  * Retrieves schedule
@@ -1560,6 +1723,9 @@ export {
1560
1723
  GameTypeFromJSON,
1561
1724
  GameTypeFromJSONTyped,
1562
1725
  GameTypeToJSON,
1726
+ InningFromJSON,
1727
+ InningFromJSONTyped,
1728
+ InningToJSON,
1563
1729
  JSONApiResponse,
1564
1730
  LeagueDatesFromJSON,
1565
1731
  LeagueDatesFromJSONTyped,
@@ -1570,6 +1736,15 @@ export {
1570
1736
  LeagueRecordFromJSONTyped,
1571
1737
  LeagueRecordToJSON,
1572
1738
  LeagueToJSON,
1739
+ LinescoreFromJSON,
1740
+ LinescoreFromJSONTyped,
1741
+ LinescoreTeamFromJSON,
1742
+ LinescoreTeamFromJSONTyped,
1743
+ LinescoreTeamToJSON,
1744
+ LinescoreTeamsFromJSON,
1745
+ LinescoreTeamsFromJSONTyped,
1746
+ LinescoreTeamsToJSON,
1747
+ LinescoreToJSON,
1573
1748
  MlbApi,
1574
1749
  RequiredError,
1575
1750
  ResponseError,
@@ -1616,9 +1791,13 @@ export {
1616
1791
  instanceOfGameTeam,
1617
1792
  instanceOfGameTeams,
1618
1793
  instanceOfGameType,
1794
+ instanceOfInning,
1619
1795
  instanceOfLeague,
1620
1796
  instanceOfLeagueDates,
1621
1797
  instanceOfLeagueRecord,
1798
+ instanceOfLinescore,
1799
+ instanceOfLinescoreTeam,
1800
+ instanceOfLinescoreTeams,
1622
1801
  instanceOfSchedule,
1623
1802
  instanceOfScheduleDay,
1624
1803
  instanceOfSeason,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bp1222/stats-api",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",