Versions Compared
Version | Old Version 1 | New Version 2 |
---|---|---|
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 | ||
---|---|---|
| ||
{ |
...
"BatterInternalId":389877, |
...
"CustomerId":6105, |
...
"FirstBaseInternalId":456210, |
...
"FirstBaseOccupied":false, |
...
"FixtureId":4462599, |
...
"IsReliable":true, |
...
"MessageTimestampUtc":"2017-03-08T13:29:14.52Z", |
...
"Phase":InProgress, |
...
"PitchCount":{}, |
...
"PitcherInternalId":5884211, |
...
"SecondBaseInternalId":456211, |
...
"SecondBaseOccupied":false, |
...
"ThirdBaseInternalId": 456212, |
...
"ThirdBaseOccupied":false, |
...
"TotalErrors": {}, |
...
"TotalHits": {}, |
...
"TotalRuns": {}, |
...
"Innings": {} |
...
} |
Element | Type | Description |
---|---|---|
BatterInternalId | String | An immutable identifier for the batter |
CustomerId | Integer | An immutable identifier for the customer |
FirstBaseInternalId | 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: |
PitchCount | PitchCount | A collection of PitchCount objects that summarises the pitch count |
PitcherInternalId | String | An immutable identifier for the pitcher |
SecondBaseInternalId | String | An immutable identifier for the second base |
SecondBaseOccupied | Boolean | True if the base has been occupied |
ThirdBaseInternalId | 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 |
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 | ||
---|---|---|
| ||
{ "BatterInternalId":512331, |
...
"CustomerId":6105, |
...
"FirstBaseInternalId":456210, |
...
"FirstBaseOccupied":false, |
...
"FixtureId":4462599, |
...
"IsReliable":true, |
...
"MessageTimestampUtc":"2017-03-08T13:29:14.52Z", |
...
"Phase":PreGame, |
...
"PitchCount":{}, |
...
"PitcherInternalId":5884211, |
...
"SecondBaseInternalId":456211, |
...
"SecondBaseOccupied":false, |
...
"ThirdBaseInternalId": 456212, |
...
"ThirdBaseOccupied":false, |
...
"TotalErrors": {}, |
...
"TotalHits": {}, |
...
"TotalRuns": {}, |
...
"AwayBattingLineup": {}, |
...
"AwayPlayers": {}, |
...
"AwayStartingLineup": {}, |
...
"HomeBattingLineup": {}, |
...
"HomePlayers": {}, |
...
"HomeStartingLineup": {}, |
...
"Innings": {} |
...
} |
Element | Type | Description |
---|---|---|
BatterInternalId | String | An immutable identifier for the batter |
CustomerId | Integer | An immutable identifier for the customer |
FirstBaseInternalId | 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 |
PitchCount | PitchCount | A collection of PitchCount objects that summarises the pitch count |
PitcherInternalId | String | An immutable identifier for the pitcher |
SecondBaseInternalId | String | An immutable identifier for the second base |
SecondBaseOccupied | Boolean | True if the base has been occupied |
ThirdBaseInternalId | 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, |
...
"InternalId":551022, |
...
"Position":ShortStop |
...
} |
Element | Type | Description |
---|---|---|
BattingSlot | Integer | Player order for the batting slot |
InternalId | String | An immutable identifier for the pitcher |
Position | PlayerPosition | Player position, possible values: |
ArrayOfPlayer
A collection of objects describing players
Code Block | ||
---|---|---|
| ||
{ |
...
"BattingHand":Left, |
...
"InternalId":551022, |
...
"Name":Stephen Drew, |
...
"SourceId":null, |
...
"ThrowingHand": |
...
Right } |
Element | Type | Description |
---|---|---|
BattingHand | Hand | Describes players batting hand, possible values are: |
InternalId | String | An immutable identifier for the pitcher |
Name | String | Player name |
SourceId | Sting | An immutable identifier for the pitcher |
ThrowingHand | Hand | Describes players throwing hand, possible values are: |