-
Notifications
You must be signed in to change notification settings - Fork 22
Data Types: Game
KCNilssen edited this page Dec 15, 2022
·
16 revisions
To be added
Attributes are expandable and collapsable - Link to Game dataclass
gamepk : int
- id number of this game
link : str
- link to the api address for this game
copyright : str
- MLB AM copyright information
metadata : MetaData
- metaData of this game. Dataclass: MetaData
wait : int
- No idea what this wait signifies
timestamp : str
- The timeStamp
gameevents : List[str]
- Current game events for this game
logicalevents : List[str]
- Current logical events for this game
gamedata : GameData
- gameData of this game. Dataclass: GameData
game : GameDataGame
- game information about this game. Dataclass: GameDataGame
pk : int
- This game's game id
type : str
- This game's game type code
doubleheader : str
- Represents if this game is a double header or not
id : str
- An unknown Id
gamedaytype : str
- This game's gameday type code
tiebreaker : str
- Is this game a tie breaker
gamenumber : int
- The game number for this game. If double header will be 2.
calendareventid : str
- The id for this calendar event
season : str
- This game's season year
seasondisplay : str
- This game's displayed season
datetime : GameDatetime
- Time and dates for this game. Dataclass: GameDatetime
datetime : str
- Date time for this game
originaldate : str
- The original scheduled date for this game
officialdate : str
- The current scheduled date for this game
daynight : str
- The current lighting condition game type
time : str
- The time
ampm : str
- The games am or pm code
status : GameStatus
- information on this game's status. Dataclass: GameStatus
abstractgamestate : str
- The abstract game state
codedgamestate : str
- The coded game state
detailedstate : str
- The detailed game state
statuscode : str
- Status code for this game
starttimetbd : bool
- If the start time is TBD
abstractgamecode : str
- The abstract game code
reason : str
- reason for a state. Usually used for delays or cancellations
teams : GameTeams
- Our two teams for this game, home and away. Dataclass: GameTeams
away : Team
- Away team. Dataclass: Team
springleague : League
- The spring league of the team. Dataclass: League
id : int
- id number of the league
name : str
- name of the league
link : str
- link of the league
abbreviation : str
- abbreviation the league
allstarstatus : str
- The all status status of the team
id : int
- id number of the team
name : str
- name of the team
link : str
- The API link for the team
season : str
- The team's current season
venue : Venue
- The team's home venue. Dataclass: Venue
id : int
- id for this venue
name : str
- Name for this venue
link : str
- Link to venues endpoint
springvenue : Venue
- The team's spring venue. Dataclass: Venue
id : int
- id for this venue
link : str
- Link to venues endpoint
teamcode : str
- team code
filecode : str
- filecode name of the team
abbreviation : str
- The abbreviation of the team name
teamname : str
- The team name
locationname : str
- The location of the team
firstyearofplay : str
- The first year the team began play
league : League
- The league of the team. Dataclass: League
id : int
- id number of the league
name : str
- name of the league
link : str
- link of the league
division : Division
- The division the team is in. Dataclass: Division
id : int
- id number of the divison
name : str
- name of the division
link : str
- link of the division
sport : Sport
- The sport of the team. Dataclass: Sport
id : int
- id number of the sport
name : str
- name the sport
link : str
- link of the sport
shortname : str
- The shortname of the team
record : TeamRecord
- The record of the team. Dataclass: TeamRecord
gamesplayed : int
- Number of game played by team
wildcardgamesback : str
- Number of game back from wildcard
leaguegamesback : str
- Number of league games back
springleaguegamesback : str
- Number of game back in spring league
sportgamesback : str
- Number of games back in sport
divisiongamesback : str
- Number of games back in division
conferencegamesback : str
- Number of games back in conference
leaguerecord : Dict
- Record in league
records : Dict
- Records
divisionleader : bool
- Is this team a divison leader
wins : int
- Number of wins
losses : int
- Number of losses
winningpercentage : str
- Winning percentage
franchisename : str
- The franchisename of the team
clubname : str
- The clubname of the team
active : str
- Active status of the team
home : Team
- Home team. Dataclass: Team
springleague : League
- The spring league of the team. Dataclass: League
id : int
- id number of the league
name : str
- name of the league
link : str
- link of the league
abbreviation : str
- abbreviation the league
allstarstatus : str
- The all status status of the team
id : int
- id number of the team
name : str
- name of the team
link : str
- The API link for the team
season : str
- The team's current season
venue : Venue
- The team's home venue. Dataclass: Venue
id : int
- id for this venue
name : str
- Name for this venue
link : str
- Link to venues endpoint
springvenue : Venue
- The team's spring venue. Dataclass: Venue
id : int
- id for this venue
link : str
- Link to venues endpoint
teamcode : str
- team code
filecode : str
- filecode name of the team
abbreviation : str
- The abbreviation of the team name
teamname : str
- The team name
locationname : str
- The location of the team
firstyearofplay : str
- The first year the team began play
league : League
- The league of the team. Dataclass: League
id : int
- id number of the league
name : str
- name of the league
link : str
- link of the league
division : Division
- The division the team is in. Dataclass: Division
id : int
- id number of the divison
name : str
- name of the division
link : str
- link of the division
sport : Sport
- The sport of the team. Dataclass: Sport
id : int
- id number of the sport
name : str
- name the sport
link : str
- link of the sport
shortname : str
- The shortname of the team
record : TeamRecord
- The record of the team. Dataclass: TeamRecord
gamesplayed : int
- Number of game played by team
wildcardgamesback : str
- Number of game back from wildcard
leaguegamesback : str
- Number of league games back
springleaguegamesback : str
- Number of game back in spring league
sportgamesback : str
- Number of games back in sport
divisiongamesback : str
- Number of games back in division
conferencegamesback : str
- Number of games back in conference
leaguerecord : Dict
- Record in league
records : Dict
- Records
divisionleader : bool
- Is this team a divison leader
wins : int
- Number of wins
losses : int
- Number of losses
winningpercentage : str
- Winning percentage
franchisename : str
- The franchisename of the team
clubname : str
- The clubname of the team
active : str
- Active status of the team
players : List[Person]
- A list of all the players for this game. Dataclass: Person
id : int
- id number of the person
full_name : str
- full_name of the person
primaryposition : str
- PrimaryPosition of the Person
pitchhand : str
- PitchHand of the Person
batside : str
- BatSide of the Person
fullname : str
- full name of the Person
firstname : str
- First name of the Person
lastname : str
- Last name of the Person
primarynumber : str
- Primary number of the Person
birthdate : str
- Birth date of the Person
currentteam : str
- The current Team of the Person
currentage : str
- The current age of the Person
birthcity : str
- The birthcity of the Person
birthstateprovince : str
- The province of the birth state
height : str
- The height of the Person
weight : str
- The weight of the Person
active : str
- The active status of the Person
usename : str
- The use name of the Person
middlename : str
- The middle name of the Person
boxscorename : str
- The box score name of the Person
nickname : str
- The nickname of the Person
draftyear : int
- The draft year of the Person
mlbdebutdate : str
- The MLB debut date of the Person
namefirstlast : str
- The first and last name of the Person
nameslug : str
- The name slug of the Person
firstlastname : str
- The first and last name of the Person
lastfirstname : str
- The last and first name of the Person
lastinitname : str
- The last init name of the Person
initlastname : str
- The init last name of the Person
fullfmlname : str
- The full fml name of the Person
fulllfmname : str
- The full lfm name of the Person
uselastname : str
- The last name of the
birthcountry : str
- The birth country of the Person
pronunciation : str
- The pronuciation of the Person's name
strikezonetop : float
- The strike zone top of the Person
strikezonebottom : float
- The strike zone bottom of the Person
nametitle : str
- The name title of the Person
gender : str
- The gender of the Person
isplayer : bool
- The player status of the Person
isverified : bool
- The verification of the Person
namematrilineal : str
- The name matrilineal of the Person
deathdate : str
- The death date of the Person
deathcity : str
- The death city of the Person
deathcountry : str
- The death country of the Person
lastplayeddate : str
- The last played date of the Person
namesuffix : str
- The namesuffix of the Person
venue : Venue
- Venue information for this game. Dataclass: Venue
id : int
- id for this venue
name : str
- Name for this venue
link : str
- Link to venues endpoint
location : Location
- Location for this venue. Dataclass: Location
address1 : str
- Venues first address line
address2 : str
- Venues second address line
city : str
- City the venue is in
state : str
- The State the venue is in
stateAbbrev : str
- The staes abbreviation
postalCode : str
- Postal code for this venue
defaultCoordinates : VenueDefaultCoordinates
- Long and lat for this venues location. Dataclass: VenueDefaultCoordinates
latitude : float
- The latatude coordinate for this venue
longitude : float
- The longitude coordinate for this venue
country : str
- What country this venue is in
phone : str
- Phone number for this venue
timezone : TimeZone
- Timezone for this venue. Dataclass: VenueTimeZone
id : str
- id string for a venues timezone
offset : int
- The offset for this timezone from
tz : str
- Timezone string
fieldinfo : FieldInfo
- Info on this venue's field. Dataclass: FieldInfo
capacity : int
- Capacity for this venue
turfType : str
- The type of turf in this venue
roofType : str
- What kind of roof for this venue
leftLine : int
- Distance down the left line
left : int
- Distance to left
leftCenter : int
- Distance to left center
center : int
- Distance to center
rightCenter : int
- Distance to right center
right : int
- Distance to right
rightLine : int
- Distance to right line
active : bool
- Is this field currently active
officialvenue : Venue
- The official venue for this game. Dataclass: Venue
id : int
- id for this venue
link : str
- Link to venues endpoint
weather : GameWeather
- The weather for this game. Dataclass: GameWeather
condition : str
- The weather condition
temp : str
- The temperature in F
wind : str
- The wind in MPH and the direction
gameinfo : GameInfo
- information on this game. Dataclass: GameInfo
attendance : int
- The attendance for this game
firstpitch : str
- The time of the first pitch
gamedurationminutes : int
- The duration of the game in minutes
delaydurationminutes : int
- The length of delay for the game in minutes
review : GameReview
- Game review info and team challenges. Dataclass: GameReview
haschallenges : bool
- If their are challenges
away : ReviewInfo
- Away team review info. Dataclass: ReviewInfo
used : int
- How many challenges used
remaining : int
- How many challenges are remaining
home : ReviewInfo
- Home team review info. Dataclass: ReviewInfo
used : int
- How many challenges used
remaining : int
- How many challenges are remaining
flags : GameFlags
- Flag bools for this game. Dataclass: GameFlags
nohitter : bool
- If there is a no hitter in this game
perfectgame : bool
- If there this game is a perfect game
awayteamnohitter : bool
- If the away team has a no hitter
awayteamperfectgame : bool
- If the away team has a perfect game
hometeamnohitter : bool
- If the home team has a no hitter
hometeamperfectgame : bool
- If the home team has a perfect game
alerts : List[]
- Alerts
probablepitchers : GameProbablePitchers
- Home and away probable pitchers for this game. Dataclass: GameProbablePitchers
home : Person
- Home team probable pitcher. Dataclass: Person
id : int
- id number of the person
full_name : str
- full_name of the person
link : str
- Link to person
away : Person
- Away team probable pitcher. Dataclass: Person
id : int
- id number of the person
full_name : str
- full_name of the person
link : str
- Link to person
officialscorer : Person
- The official scorer for this game. Dataclass: Person
id : int
- id number of the person
full_name : str
- full_name of the person
link : str
- Link to person
primarydatacaster : Person
- The official dataCaster for this game. Dataclass: Person
id : int
- id number of the person
full_name : str
- full_name of the person
link : str
- Link to person
livedata : LiveData
- liveData of this game
https://statsapi.mlb.com/api/v1.1/game/534196/feed/live
import mlbstatsapi
mlb = mlbstatsapi.Mlb()
mlb.get_game(game_id = 534196)
Note: This information is provided for reference only, without warranty or guarantee, and is not official documentation provided by MLB. This package and its author are not affiliated with MLB or any MLB team. This API wrapper interfaces with MLB's Stats API. Use of MLB data is subject to the notice posted at http://gdx.mlb.com/components/copyright.txt.