@bp1222/stats-api 0.0.1
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 +26 -0
- package/openapitools.json +14 -0
- package/package.json +20 -0
- package/spec/components/parameters/parameters.yaml +21 -0
- package/spec/components/parameters/query/date.yaml +5 -0
- package/spec/components/parameters/query/endDate.yaml +5 -0
- package/spec/components/parameters/query/eventTypes.yaml +5 -0
- package/spec/components/parameters/query/fields.yaml +10 -0
- package/spec/components/parameters/query/gamePks.yaml +5 -0
- package/spec/components/parameters/query/gameTypes.yaml +5 -0
- package/spec/components/parameters/query/hydrate.yaml +5 -0
- package/spec/components/parameters/query/leagueId.yaml +5 -0
- package/spec/components/parameters/query/leagueIds.yaml +7 -0
- package/spec/components/parameters/query/opponentId.yaml +5 -0
- package/spec/components/parameters/query/scheduleType.yaml +5 -0
- package/spec/components/parameters/query/season.yaml +5 -0
- package/spec/components/parameters/query/sportId.yaml +6 -0
- package/spec/components/parameters/query/startDate.yaml +5 -0
- package/spec/components/parameters/query/teamId.yaml +5 -0
- package/spec/components/parameters/query/venueIds.yaml +5 -0
- package/spec/components/schemas/division.yaml +32 -0
- package/spec/components/schemas/game.yaml +157 -0
- package/spec/components/schemas/gameTeam.yaml +30 -0
- package/spec/components/schemas/league.yaml +62 -0
- package/spec/components/schemas/record.yaml +110 -0
- package/spec/components/schemas/schedule.yaml +41 -0
- package/spec/components/schemas/schemas.yaml +22 -0
- package/spec/components/schemas/season.yaml +53 -0
- package/spec/components/schemas/sport.yaml +21 -0
- package/spec/components/schemas/standings.yaml +24 -0
- package/spec/components/schemas/team.yaml +50 -0
- package/spec/components/schemas/venue.yaml +18 -0
- package/spec/openapi.yaml +32 -0
- package/spec/paths/allSeasons.yaml +23 -0
- package/spec/paths/schedule.yaml +20 -0
- package/spec/paths/season.yaml +18 -0
- package/spec/paths/standings.yaml +27 -0
- package/spec/paths/teams.yaml +33 -0
- package/src/.openapi-generator/FILES +27 -0
- package/src/.openapi-generator/VERSION +1 -0
- package/src/.openapi-generator-ignore +23 -0
- package/src/apis/MlbApi.ts +328 -0
- package/src/apis/index.ts +3 -0
- package/src/index.ts +5 -0
- package/src/models/Division.ts +164 -0
- package/src/models/Game.ts +385 -0
- package/src/models/GameContent.ts +60 -0
- package/src/models/GameTeam.ts +117 -0
- package/src/models/GameTeams.ts +77 -0
- package/src/models/League.ts +190 -0
- package/src/models/MLBDivision.ts +164 -0
- package/src/models/MLBGame.ts +385 -0
- package/src/models/MLBGameContent.ts +60 -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/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/MLBTeamRecord.ts +76 -0
- package/src/models/MLBTeamRecord1.ts +88 -0
- package/src/models/MLBTeams.ts +67 -0
- package/src/models/MLBVenue.ts +95 -0
- package/src/models/Record.ts +337 -0
- package/src/models/Schedule.ts +105 -0
- package/src/models/Season.ts +226 -0
- package/src/models/Sport.ts +110 -0
- package/src/models/Standings.ts +130 -0
- package/src/models/Team.ts +248 -0
- package/src/models/Venue.ts +95 -0
- package/src/models/index.ts +24 -0
- package/src/runtime.ts +426 -0
- package/tsconfig.json +108 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
title: MLBSeason
|
|
2
|
+
description: >
|
|
3
|
+
Season
|
|
4
|
+
type: object
|
|
5
|
+
required:
|
|
6
|
+
- seasonId
|
|
7
|
+
- seasonStartDate
|
|
8
|
+
- seasonEndDate
|
|
9
|
+
- regularSeasonStartDate
|
|
10
|
+
- regularSeasonEndDate
|
|
11
|
+
properties:
|
|
12
|
+
seasonId:
|
|
13
|
+
type: string
|
|
14
|
+
hasWildcard:
|
|
15
|
+
type: boolean
|
|
16
|
+
preSeasonStartDate:
|
|
17
|
+
type: string
|
|
18
|
+
preSeasonEndDate:
|
|
19
|
+
type: string
|
|
20
|
+
seasonStartDate:
|
|
21
|
+
type: string
|
|
22
|
+
seasonEndDate:
|
|
23
|
+
type: string
|
|
24
|
+
springStartDate:
|
|
25
|
+
type: string
|
|
26
|
+
springEndDate:
|
|
27
|
+
type: string
|
|
28
|
+
regularSeasonStartDate:
|
|
29
|
+
type: string
|
|
30
|
+
lastDate1stHalf:
|
|
31
|
+
type: string
|
|
32
|
+
allStartDate:
|
|
33
|
+
type: string
|
|
34
|
+
firstDate2ndHalf:
|
|
35
|
+
type: string
|
|
36
|
+
regularSeasonEndDate:
|
|
37
|
+
type: string
|
|
38
|
+
postSeasonStartDate:
|
|
39
|
+
type: string
|
|
40
|
+
postSeasonEndDate:
|
|
41
|
+
type: string
|
|
42
|
+
offSeasonStartDate:
|
|
43
|
+
type: string
|
|
44
|
+
offSeasonEndDate:
|
|
45
|
+
type: string
|
|
46
|
+
seasonLevelGamedayType:
|
|
47
|
+
type: string
|
|
48
|
+
gameLevelGamedayType:
|
|
49
|
+
type: string
|
|
50
|
+
qualifierPlateAppearances:
|
|
51
|
+
type: number
|
|
52
|
+
qualifierOutsPitched:
|
|
53
|
+
type: number
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
title: MLBSport
|
|
2
|
+
description: >
|
|
3
|
+
Sport
|
|
4
|
+
type: object
|
|
5
|
+
required:
|
|
6
|
+
- id
|
|
7
|
+
properties:
|
|
8
|
+
id:
|
|
9
|
+
type: number
|
|
10
|
+
code:
|
|
11
|
+
type: string
|
|
12
|
+
link:
|
|
13
|
+
type: string
|
|
14
|
+
name:
|
|
15
|
+
type: string
|
|
16
|
+
abbreviation:
|
|
17
|
+
type: string
|
|
18
|
+
sortOrder:
|
|
19
|
+
type: number
|
|
20
|
+
activeStatus:
|
|
21
|
+
type: boolean
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
title: MLBStandings
|
|
2
|
+
description: >
|
|
3
|
+
Standings
|
|
4
|
+
type: object
|
|
5
|
+
required:
|
|
6
|
+
- league
|
|
7
|
+
- division
|
|
8
|
+
- sport
|
|
9
|
+
- teamRecords
|
|
10
|
+
properties:
|
|
11
|
+
standingsType:
|
|
12
|
+
type: string
|
|
13
|
+
league:
|
|
14
|
+
$ref: ./schemas.yaml#/MLBLeague
|
|
15
|
+
division:
|
|
16
|
+
$ref: ./schemas.yaml#/MLBDivision
|
|
17
|
+
sport:
|
|
18
|
+
$ref: ./schemas.yaml#/MLBSport
|
|
19
|
+
lastUpdated:
|
|
20
|
+
type: string
|
|
21
|
+
teamRecords:
|
|
22
|
+
type: array
|
|
23
|
+
items:
|
|
24
|
+
$ref: ./schemas.yaml#/MLBRecord
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
title: MLBTeam
|
|
2
|
+
description: >
|
|
3
|
+
Team
|
|
4
|
+
type: object
|
|
5
|
+
required:
|
|
6
|
+
- id
|
|
7
|
+
- name
|
|
8
|
+
properties:
|
|
9
|
+
id:
|
|
10
|
+
type: number
|
|
11
|
+
name:
|
|
12
|
+
type: string
|
|
13
|
+
link:
|
|
14
|
+
type: string
|
|
15
|
+
allStarStatus:
|
|
16
|
+
type: string
|
|
17
|
+
season:
|
|
18
|
+
type: number
|
|
19
|
+
venue:
|
|
20
|
+
$ref: ./schemas.yaml#/MLBVenue
|
|
21
|
+
springVenue:
|
|
22
|
+
$ref: ./schemas.yaml#/MLBVenue
|
|
23
|
+
teamCode:
|
|
24
|
+
type: string
|
|
25
|
+
fileCode:
|
|
26
|
+
type: string
|
|
27
|
+
abbreviation:
|
|
28
|
+
type: string
|
|
29
|
+
teamName:
|
|
30
|
+
type: string
|
|
31
|
+
locationName:
|
|
32
|
+
type: string
|
|
33
|
+
firstYearOfPlay:
|
|
34
|
+
type: string
|
|
35
|
+
league:
|
|
36
|
+
$ref: ./schemas.yaml#/MLBLeague
|
|
37
|
+
springLeague:
|
|
38
|
+
$ref: ./schemas.yaml#/MLBLeague
|
|
39
|
+
division:
|
|
40
|
+
$ref: ./schemas.yaml#/MLBDivision
|
|
41
|
+
sport:
|
|
42
|
+
$ref: ./schemas.yaml#/MLBSport
|
|
43
|
+
shortName:
|
|
44
|
+
type: string
|
|
45
|
+
franchiseName:
|
|
46
|
+
type: string
|
|
47
|
+
clubName:
|
|
48
|
+
type: string
|
|
49
|
+
active:
|
|
50
|
+
type: boolean
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
openapi: 3.0.2
|
|
2
|
+
info:
|
|
3
|
+
title: MLB StatAPI
|
|
4
|
+
description: >
|
|
5
|
+
An spec API to consume the MLB Stat API
|
|
6
|
+
version: 0.0.1
|
|
7
|
+
contact:
|
|
8
|
+
name: "dave@mudsite.com"
|
|
9
|
+
|
|
10
|
+
servers:
|
|
11
|
+
- url: https://statsapi.mlb.com/api
|
|
12
|
+
|
|
13
|
+
tags:
|
|
14
|
+
- name: mlb
|
|
15
|
+
|
|
16
|
+
paths:
|
|
17
|
+
/v1/schedule:
|
|
18
|
+
$ref: ./paths/schedule.yaml
|
|
19
|
+
/v1/seasons:
|
|
20
|
+
$ref: ./paths/season.yaml
|
|
21
|
+
/v1/seasons/all:
|
|
22
|
+
$ref: ./paths/allSeasons.yaml
|
|
23
|
+
/v1/teams:
|
|
24
|
+
$ref: ./paths/teams.yaml
|
|
25
|
+
/v1/standings:
|
|
26
|
+
$ref: ./paths/standings.yaml
|
|
27
|
+
|
|
28
|
+
components:
|
|
29
|
+
parameters:
|
|
30
|
+
$ref: ./components/parameters/parameters.yaml
|
|
31
|
+
schemas:
|
|
32
|
+
$ref: ./components/schemas/schemas.yaml
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# /v1/seasons/all?sportId={sportId}
|
|
2
|
+
get:
|
|
3
|
+
operationId: getAllSeasons
|
|
4
|
+
summary: Retrieves All Seasons over time
|
|
5
|
+
description: >
|
|
6
|
+
Returns All Seasons
|
|
7
|
+
parameters:
|
|
8
|
+
- $ref: ../components/parameters/parameters.yaml#/SportId
|
|
9
|
+
tags:
|
|
10
|
+
- mlb
|
|
11
|
+
responses:
|
|
12
|
+
"200":
|
|
13
|
+
description: OK
|
|
14
|
+
content:
|
|
15
|
+
application/json:
|
|
16
|
+
schema:
|
|
17
|
+
title: MLBSeasons
|
|
18
|
+
type: object
|
|
19
|
+
properties:
|
|
20
|
+
seasons:
|
|
21
|
+
type: array
|
|
22
|
+
items:
|
|
23
|
+
$ref: ../components/schemas/schemas.yaml#/MLBSeason
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# /v1/schedule
|
|
2
|
+
get:
|
|
3
|
+
operationId: getSchedule
|
|
4
|
+
summary: Retrieves schedule
|
|
5
|
+
description: >
|
|
6
|
+
Returns Schedule
|
|
7
|
+
parameters:
|
|
8
|
+
- $ref: ../components/parameters/parameters.yaml#/SportId
|
|
9
|
+
- $ref: ../components/parameters/parameters.yaml#/TeamId
|
|
10
|
+
- $ref: ../components/parameters/parameters.yaml#/StartDate
|
|
11
|
+
- $ref: ../components/parameters/parameters.yaml#/EndDate
|
|
12
|
+
tags:
|
|
13
|
+
- mlb
|
|
14
|
+
responses:
|
|
15
|
+
"200":
|
|
16
|
+
description: OK
|
|
17
|
+
content:
|
|
18
|
+
application/json:
|
|
19
|
+
schema:
|
|
20
|
+
$ref: ../components/schemas/schemas.yaml#/MLBSchedule
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# /v1/seasons
|
|
2
|
+
get:
|
|
3
|
+
operationId: getSeason
|
|
4
|
+
summary: Retrieves season
|
|
5
|
+
description: >
|
|
6
|
+
Returns Season
|
|
7
|
+
parameters:
|
|
8
|
+
- $ref: ../components/parameters/parameters.yaml#/SportId
|
|
9
|
+
- $ref: ../components/parameters/parameters.yaml#/Season
|
|
10
|
+
tags:
|
|
11
|
+
- mlb
|
|
12
|
+
responses:
|
|
13
|
+
"200":
|
|
14
|
+
description: OK
|
|
15
|
+
content:
|
|
16
|
+
application/json:
|
|
17
|
+
schema:
|
|
18
|
+
$ref: ../components/schemas/schemas.yaml#/MLBSeason
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# /v1/standings
|
|
2
|
+
get:
|
|
3
|
+
operationId: getStandings
|
|
4
|
+
summary: Retrieves Standings
|
|
5
|
+
description: >
|
|
6
|
+
Returns Standing
|
|
7
|
+
parameters:
|
|
8
|
+
- $ref: ../components/parameters/parameters.yaml#/LeagueId
|
|
9
|
+
- $ref: ../components/parameters/parameters.yaml#/Season
|
|
10
|
+
- $ref: ../components/parameters/parameters.yaml#/Date
|
|
11
|
+
- $ref: ../components/parameters/parameters.yaml#/Fields
|
|
12
|
+
- $ref: ../components/parameters/parameters.yaml#/Hydrate
|
|
13
|
+
tags:
|
|
14
|
+
- mlb
|
|
15
|
+
responses:
|
|
16
|
+
"200":
|
|
17
|
+
description: OK
|
|
18
|
+
content:
|
|
19
|
+
application/json:
|
|
20
|
+
schema:
|
|
21
|
+
title: MLBStandingsList
|
|
22
|
+
type: object
|
|
23
|
+
properties:
|
|
24
|
+
records:
|
|
25
|
+
type: array
|
|
26
|
+
items:
|
|
27
|
+
$ref: ../components/schemas/schemas.yaml#/MLBStandings
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# /v1/teams
|
|
2
|
+
get:
|
|
3
|
+
operationId: getTeams
|
|
4
|
+
summary: Retrieves Teams
|
|
5
|
+
description: >
|
|
6
|
+
Returns Teams
|
|
7
|
+
parameters:
|
|
8
|
+
- $ref: ../components/parameters/parameters.yaml#/SportId
|
|
9
|
+
- $ref: ../components/parameters/parameters.yaml#/Season
|
|
10
|
+
- $ref: ../components/parameters/parameters.yaml#/LeagueIds
|
|
11
|
+
#"season",
|
|
12
|
+
#"activeStatus",
|
|
13
|
+
#"leagueIds",
|
|
14
|
+
#"sportId",
|
|
15
|
+
#"sportIds",
|
|
16
|
+
#"gameType",
|
|
17
|
+
#"hydrate",
|
|
18
|
+
#"fields",
|
|
19
|
+
tags:
|
|
20
|
+
- mlb
|
|
21
|
+
responses:
|
|
22
|
+
"200":
|
|
23
|
+
description: OK
|
|
24
|
+
content:
|
|
25
|
+
application/json:
|
|
26
|
+
schema:
|
|
27
|
+
title: MLBTeams
|
|
28
|
+
type: object
|
|
29
|
+
properties:
|
|
30
|
+
teams:
|
|
31
|
+
type: array
|
|
32
|
+
items:
|
|
33
|
+
$ref: ../components/schemas/schemas.yaml#/MLBTeam
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
apis/MlbApi.ts
|
|
2
|
+
apis/index.ts
|
|
3
|
+
index.ts
|
|
4
|
+
models/Division.ts
|
|
5
|
+
models/Game.ts
|
|
6
|
+
models/GameContent.ts
|
|
7
|
+
models/GameTeam.ts
|
|
8
|
+
models/GameTeams.ts
|
|
9
|
+
models/League.ts
|
|
10
|
+
models/MLBGameStatus.ts
|
|
11
|
+
models/MLBLeagueDates.ts
|
|
12
|
+
models/MLBScheduleDay.ts
|
|
13
|
+
models/MLBSeasons.ts
|
|
14
|
+
models/MLBStandingsList.ts
|
|
15
|
+
models/MLBStreak.ts
|
|
16
|
+
models/MLBTeamRecord.ts
|
|
17
|
+
models/MLBTeamRecord1.ts
|
|
18
|
+
models/MLBTeams.ts
|
|
19
|
+
models/Record.ts
|
|
20
|
+
models/Schedule.ts
|
|
21
|
+
models/Season.ts
|
|
22
|
+
models/Sport.ts
|
|
23
|
+
models/Standings.ts
|
|
24
|
+
models/Team.ts
|
|
25
|
+
models/Venue.ts
|
|
26
|
+
models/index.ts
|
|
27
|
+
runtime.ts
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
7.7.0
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# OpenAPI Generator Ignore
|
|
2
|
+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
|
3
|
+
|
|
4
|
+
# Use this file to prevent files from being overwritten by the generator.
|
|
5
|
+
# The patterns follow closely to .gitignore or .dockerignore.
|
|
6
|
+
|
|
7
|
+
# As an example, the C# client generator defines ApiClient.cs.
|
|
8
|
+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
|
9
|
+
#ApiClient.cs
|
|
10
|
+
|
|
11
|
+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
|
12
|
+
#foo/*/qux
|
|
13
|
+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
|
14
|
+
|
|
15
|
+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
|
16
|
+
#foo/**/qux
|
|
17
|
+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
|
18
|
+
|
|
19
|
+
# You can also negate patterns with an exclamation (!).
|
|
20
|
+
# For example, you can ignore all files in a docs folder with the file extension .md:
|
|
21
|
+
#docs/*.md
|
|
22
|
+
# Then explicitly reverse the ignore rule for a single file:
|
|
23
|
+
#!docs/README.md
|