Versions Compared
Version | Old Version 5 | New Version 6 |
---|---|---|
Changes made by | ||
Saved on |
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Baseball rules can be found here: http://mlb.mlb.com/mlb/official_info/official_rules
This document describes the baseball match state contract.
Anchor | ||||
---|---|---|---|---|
|
The Match Summary message complements the Match Details message by summarising the important match information for rapid, easy access.
Code Block | ||
---|---|---|
| ||
{ "BatterInternalIdBatterPlayerId":389877, "CustomerId":6105, "FirstBaseInternalIdFirstBasePlayerId":456210, "FirstBaseOccupied":false, "FixtureId":4462599, "IsReliable":true, "MessageTimestampUtc":"2017-03-08T13:29:14.52Z", "Phase":InProgress, "BallInPlay":Unknown, "PitchCount":{}, "PitcherInternalIdPitcherPlayerId":5884211, "SecondBaseInternalIdSecondBasePlayerId":456211, "SecondBaseOccupied":false, "ThirdBaseInternalIdThirdBasePlayerId": 456212, "ThirdBaseOccupied":false, "TotalErrors": {}, "TotalHits": {}, "TotalRuns": {}, "Innings": {} } |
Element | Type | Description | BatterInternalId
---|---|---|
BatterPlayerId | String | An immutable identifier for the batter |
CustomerId | Integer | An immutable identifier for the customer | FirstBaseInternalId
FirstBasePlayerId | String | An immutable identifier for the first base |
FirstBaseOccupied | Boolean | True if the base has been occupied |
FixtureId | String | An immutable identifier for the event |
IsReliable | Boolean | True if all summarised information is reliable. False if at least one of the summarised collections is unreliable. |
MessageTimestampUtc | Datetime | The time that the message is sent, UTC |
Phase | MatchPhase | The phase of play during which the action happened, possible values are: |
BallInPlay | Enum | Indicates whether the ball is in play or not. Possible values are: No Unknown (Default) |
PitchCount | PitchCount | A collection of PitchCount objects that summarises the pitch count |
PitcherPlayerId | String | An immutable identifier for the pitcher |
SecondBasePlayerId | String | An immutable identifier for the second base |
SecondBaseOccupied | Boolean | True if the base has been occupied |
ThirdBasePlayerId | String | An immutable identifier for the third base |
ThirdBaseOccupied | Boolean | True if the base has been occupied |
TotalErrors | Score | A collection of TotalErrors objects that summarises the total errors |
TotalHits | Score | A collection of TotalHits objects that summarises the total hits |
TotalRuns | Score | A collection of TotalRuns objects that summarises the total runs |
Innings | ArrayOfInningDetails | A collection of Innings objects that summarises the inning details |
MatchDuration | Not currently used (null) | |
WinningPitcher | Not currently used (null) | |
LosingPitcher | Not currently used (null) | |
SavingPitcher | Not currently used (null) |
PitchCount
A collection of objects describing Pitch.
Code Block | ||
---|---|---|
| ||
{ "Balls":1, "Strikes":2, "TotalPitches":3 } |
Element | Type | Description |
---|---|---|
Balls | Integer | Describes total balls by the current Pitcher |
Strikes | Integer | Describes Strikes by the current Pitcher |
TotalPitches | Integer | Describes total pitches by the current Pitcher |
Score
A collection of objects describing Score.
Code Block | ||
---|---|---|
| ||
{ "Home":0, "Away":0 } |
Element | Type | Description |
---|---|---|
Home | Integer | Integer count of Home total errors |
Away | Integer | Integer count of Away total errors |
ArrayOfInningDetails
A collection of objects describing the Inning
Code Block | ||
---|---|---|
| ||
{ "Errors":{}, "Hits":{}, "InningNumber":1, "LeftOnBase":{}, "Outs":{}, "Runs":{}, "Status": Finished } |
Element | Type | Description |
---|---|---|
Errors | Score | A collection of Errors objects that summarises the total errors |
Hits | Score | A collection of Hits objects that summarises the total hits |
InningNumber | Integer | Describes the inning played |
LeftOnBase | Score | A collection of LeftOnBase objects that summarises the players on base |
Outs | Score | A collection of Outs objects that summarises the total outs |
Runs | Score | A collection of Runs objects that summarises the total runs |
Status | InningStatus | Describes the Inning status, possible values are: |
Anchor | ||||
---|---|---|---|---|
|
The Match Details message contains the details of the game so far, including points scored, errors committed and runs.
Code Block | ||
---|---|---|
| ||
{ "BatterInternalIdBatterPlayerId":512331, "CustomerId":6105, "FirstBaseInternalIdFirstBasePlayerId":456210, "FirstBaseOccupied":false, "FixtureId":4462599, "IsReliable":true, "MessageTimestampUtc":"2017-03-08T13:29:14.52Z", "Phase":PreGame, "BallInPlay":Unknown, "PitchCount":{}, "PitcherInternalIdPitcherPlayerId":5884211, "SecondBaseInternalIdSecondBasePlayerId":456211, "SecondBaseOccupied":false, "ThirdBaseInternalIdThirdBasePlayerId": 456212, "ThirdBaseOccupied":false, "TotalErrors": {}, "TotalHits": {}, "TotalRuns": {}, "AwayBattingLineup": {}, "AwayPlayers": {}, "AwayStartingLineup": {}, "HomeBattingLineup": {}, "HomePlayers": {}, "HomeStartingLineup": {}, "Innings": {} } |
Element | Type | Description |
---|---|---|
BatterInternalIdBatterPlayerId | String | An immutable identifier for the batter |
CustomerId | Integer | An immutable identifier for the customer |
FirstBaseInternalIdFirstBasePlayerId | String | An immutable identifier for the first base |
FirstBaseOccupied | Boolean | True if the base has been occupied |
FixtureId | String | An immutable identifier for the event |
IsReliable | Boolean | True if all summarised information is reliable. False if at least one of the summarised collections is unreliable. |
MessageTimestampUtc | Datetime | The time that the message is sent, UTC |
Phase | MatchPhase | The phase of play during which the action happened |
BallInPlay | Enum | Indicates whether the ball is in play or not. Possible values are: No Unknown (Default) |
PitchCount | PitchCount | A collection of PitchCount objects that summarises the pitch count |
PitcherInternalIdPitcherPlayerId | String | An immutable identifier for the pitcher |
SecondBaseInternalIdSecondBasePlayerId | String | An immutable identifier for the second base |
SecondBaseOccupied | Boolean | True if the base has been occupied |
ThirdBaseInternalIdThirdBasePlayerId | String | An immutable identifier for the third base |
ThirdBaseOccupied | Boolean | True if the base has been occupied |
TotalErrors | TotalErrors | A collection of TotalErrors objects that summarises the total errors |
TotalHits | TotalHits | A collection of TotalHits objects that summarises the total hits |
TotalRuns | TotalRuns | A collection of TotalRuns objects that summarises the total runs |
AwayBattingLineup | BattingLineup | A collection of BattingLineup objects that summarises batting line up |
AwayPlayers | ArrayOfPlayer | An Array Of Player objects that summarises players in team |
AwayStartingLineup | ArrayOfLineupEntry | An Array Of Player objects that summarises staring line up for a team |
HomeBattingLineup | BattingLineup | A collection of BattingLineup objects that summarises batting line up |
HomePlayers | ArrayOfPlayer | An Array Of Player objects that summarises players in team |
HomeStartingLineup | ArrayOfLineupEntry | An Array Of Player objects that summarises staring line up for a team |
Innings | ArrayOfInningDetails | A collection of Innings objects that summarises the inning details |
BattingLineup
A collection of objects describing Batting line up
Code Block | ||
---|---|---|
| ||
{ "CurrentBatterId":621637, "LineupEntry":6105 } |
Element | Type | Description |
---|---|---|
CurrentBatterId | String | An immutable identifier for the current batter |
LineupEntry | ArrayOfLineupEntry |
|
ArrayOfLineupEntry
A collection of objects describing line up
Code Block | ||
---|---|---|
| ||
{ "BattingSlot":1, "InternalIdPlayerId":551022, "Position":ShortStop } |
Element | Type | Description |
---|---|---|
BattingSlot | Integer | Player order for the batting slot |
InternalIdPlayerId | String | An immutable identifier for the pitcher |
Position | PlayerPosition | Player position, possible values: |
ArrayOfPlayer
A collection of objects describing players
Code Block | ||
---|---|---|
| ||
{ "BattingHand":Left, "InternalIdPlayerId":551022, "Name":Stephen Drew, "SourceId":null, "ThrowingHand":Right } |
Element | Type | Description |
---|---|---|
BattingHand | Hand | Describes players batting hand, possible values are: |
InternalIdPlayerId | String | An immutable identifier for the pitcher |
Name | String | Player name |
SourceId | String | An immutable identifier for the pitcher |
ThrowingHand | Hand | Describes players throwing hand, possible values are: |