API Update: Colors, Subseasons, and Availability Logos

We've just rolled out the first user-facing API additions since our API was first made public.

Here are the public API changes:

  • Color has been added. – This is a scalar used to represent colors, such as team colors.
  • Team has new fields: colors – You can use this to get colors for each team.
  • EventAvailability.shortName has changed from String to String!. – "Event availability" objects indicate what platform or network events will be available on. This is our guarantee that each of these objects will always have a short name.
  • EventAvailability has new fields: logo – If reasonable, we'll provide a logo for networks and platforms that our games are on.
  • Game.availability has changed from [EventAvailability]! to [EventAvailability!]!. – We won't be including null items in this list.
  • Subseason has been added. – This is an enum type that differentiates games and time ranges from being "pre-season", "regular", or "post-season".
  • NamedTimeRange has new fields: subseason – Indicates whether the time range is "pre-season", "regular", or "post-season".
  • Game has new fields: subseason – Indicates whether the game is "pre-season", "regular", or "post-season".

Here are the changes made to APIs that aren't available to unprivileged users:

  • EventAvailabilityInput has been added.
  • GamePatchInput has new fields: availability, subseason
  • Mutation has new fields: patchNamedTimeRange
  • NamedTimeRangePatchInput has been added.
  • TeamPatchInput has new fields: colors
  • UserRole has new enum values: STADIUM

Most of these are added so we can conveniently support the above public changes. The last one isn't though: In the beginning we were testing transmission of things like clock signals from the stadium using admin access tokens. That was convenient for early internal testing, but in prod we want to follow the principle of least privilege. So this less privileged role is assigned to our in-stadium systems.

API Update: Colors, Subseasons, and Availability Logos
Share this