While the version 2 livestream read call (v2) is very similar to the version 1 (v1) call there are a number of minor differences.
Different URL. The url now contains v2 instead of v1.
The types parameter now accepts a different set of options. Included in these additions is the option to restrict the depth of the box score data being returned.
With the v2 call most messages will now contain a 'messageId' field. The field is unique for each message (it is even different between an action and it's update/delete). Instead of requesting messages since the last actionNumber you now request messages from a specific messageId.
The scoreboard message type has been removed. The information it contained is available in the status and box score messages.
The status
and periodStatus
keys in the status message now have different values. All values are now sent in lower-case.
Using the types
parameter you can decide if you want to box score to contain totals or broken down into period by period.
Action messages now contain an extra field called value
. This is currently only used by the clock adjustment action to allow for adjustments of more than 1min/1sec.
On updates/deletes there is an additional field also present. origMessageId
. This field gives the messageId when the action was first seen.
In the v2 call there is a slight variation on when certain messages are sent.
Box Score
v1: The box score is sent every 15 seconds
v2: The box score is sent after every action that causes a change to the box score
Status Message
v1: The status message is sent every 5 seconds when the clock is running
v2: The status message is sent after every action when the clock is running or after a change in status
PlayByPlay
v1: The score (and players on court) against each individual action is not updated after being sent
v2: The score (and players on court) against each individual action is recalculated depending on edits/insertions