Differences between the v1 and v2 read calls

While the version 2 livestream read call (v2) is very similar to the version 1 (v1) call there are a number of minor differences.

  1. Different URL

    Different URL. The url now contains v2 instead of v1.

  2. types parameter

    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.

  3. lastAction / fromMessageId parameter

    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.

  4. scoreboard message type

    The scoreboard message type has been removed. The information it contained is available in the status and box score messages.

  5. status message values

    The status and periodStatus keys in the status message now have different values. All values are now sent in lower-case.

  6. box score depth
  7. Using the types parameter you can decide if you want to box score to contain totals or broken down into period by period.

  8. extra action fields
  9. 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.

  10. timing
  11. 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