# com.professorbutts.sports.defs

> Shared types for com.professorbutts.sports records and the post-side scoreboard field.

- Kind: defs
- Authority: sports.professorbutts.com
- Lexicon: 1
- Published by [professorbutts.com](https://lexicon.garden/identity/did:plc:x6njyeyi47bqs2kueuv3mrg5), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:x6njyeyi47bqs2kueuv3mrg5/com.professorbutts.sports.defs)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:x6njyeyi47bqs2kueuv3mrg5/com.professorbutts.sports.defs/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:x6njyeyi47bqs2kueuv3mrg5/com.professorbutts.sports.defs/analytics)

## #baseballBoxScore (`com.professorbutts.sports.defs#baseballBoxScore`)

Type: object

Runs, hits, errors.

### Properties

- `away` (ref, required)
  - Reference: `#baseballTeamLine`
- `home` (ref, required)
  - Reference: `#baseballTeamLine`

## #baseballSituation (`com.professorbutts.sports.defs#baseballSituation`)

Type: object

Baseball detail: count, outs and runners.

### Properties

- `balls` (integer)
  - Constraints: minimum: 0, maximum: 3
- `onFirst` (boolean)
- `onSecond` (boolean)
- `onThird` (boolean)
- `outs` (integer)
  - Constraints: minimum: 0, maximum: 3
- `strikes` (integer)
  - Constraints: minimum: 0, maximum: 2

## #baseballTeamLine (`com.professorbutts.sports.defs#baseballTeamLine`)

Type: object

### Properties

- `errors` (integer, required)
  - Constraints: minimum: 0
- `hits` (integer, required)
  - Constraints: minimum: 0
- `leftOnBase` (integer)
  - Constraints: minimum: 0
- `runs` (integer, required)
  - Constraints: minimum: 0

## #basketballBoxScore (`com.professorbutts.sports.defs#basketballBoxScore`)

Type: object

Basketball team stats.

### Properties

- `away` (ref, required)
  - Reference: `#basketballTeamStats`
- `home` (ref, required)
  - Reference: `#basketballTeamStats`

## #basketballSituation (`com.professorbutts.sports.defs#basketballSituation`)

Type: object

Basketball detail.

### Properties

- `awayFouls` (integer)
  - Constraints: minimum: 0
- `awayTimeouts` (integer)
  - Constraints: minimum: 0
- `bonus` (string): Which team is shooting bonus free throws.
  - Constraints: knownValues: home | away | both
- `homeFouls` (integer): Team fouls this period.
  - Constraints: minimum: 0
- `homeTimeouts` (integer)
  - Constraints: minimum: 0
- `possession` (string)
  - Constraints: knownValues: home | away

## #basketballTeamStats (`com.professorbutts.sports.defs#basketballTeamStats`)

Type: object

### Properties

- `assists` (integer)
  - Constraints: minimum: 0
- `blocks` (integer)
  - Constraints: minimum: 0
- `fieldGoals` (string): Made-attempted, e.g. '31-68'.
  - Constraints: maxLength: 8
- `freeThrows` (string)
  - Constraints: maxLength: 8
- `rebounds` (integer)
  - Constraints: minimum: 0
- `steals` (integer)
  - Constraints: minimum: 0
- `threePointers` (string)
  - Constraints: maxLength: 8
- `turnovers` (integer)
  - Constraints: minimum: 0

## #competitor (`com.professorbutts.sports.defs#competitor`)

Type: object

### Properties

- `abbreviation` (string)
  - Constraints: maxLength: 8
- `color` (string): Primary hex color, e.g. '#FB4F14'.
  - Constraints: maxLength: 7
- `logo` (blob)
  - Constraints: maxSize: 200000, accept: image/png, image/svg+xml, image/webp
- `logoUrl` (string · uri): Team logo image URL. Viewers may use it when there's no logo blob.
  - Constraints: maxLength: 512
- `name` (string, required)
  - Constraints: maxLength: 128
- `profile` (string · did): Optional atproto account for the team.
- `rank` (integer): Poll ranking (college), e.g. 5 for #5.
  - Constraints: minimum: 1, maximum: 99
- `record` (string): Season record, e.g. '6-3'.
  - Constraints: maxLength: 16
- `score` (integer, required)
  - Constraints: minimum: 0
- `secondaryColor` (string): Secondary hex color for stripes, e.g. '#000000'.
  - Constraints: maxLength: 7

## #entrant (`com.professorbutts.sports.defs#entrant`)

Type: object

One player, driver or team in a leaderboard.

### Properties

- `color` (string): Hex team color.
  - Constraints: maxLength: 7
- `country` (string): ISO 3166-1 alpha-3, for a flag.
  - Constraints: maxLength: 3
- `detail` (string): Secondary figure as shown, e.g. golf 'Thru 14', race '72 laps', a time '1:12.345'.
  - Constraints: maxLength: 16
- `laps` (integer): Racing: laps completed.
  - Constraints: minimum: 0
- `lapsLed` (integer): Racing: laps led (NASCAR).
  - Constraints: minimum: 0
- `members` (array): Standings: the drivers in a constructor or team, with their own places.
  - Constraints: maxLength: 4
  - `items` (ref)
    - Reference: `#member`
- `name` (string, required)
  - Constraints: maxLength: 128
- `number` (string): Car number.
  - Constraints: maxLength: 4
- `photoUrl` (string · uri)
  - Constraints: maxLength: 512
- `points` (integer): Points earned in this session, or season total on a standings record.
  - Constraints: minimum: 0
- `position` (integer): Numeric place, for sorting.
  - Constraints: minimum: 1
- `positionLabel` (string): Place as shown, e.g. 'T3', 'CUT', 'DNF'.
  - Constraints: maxLength: 8
- `profile` (string · did): Optional atproto account.
- `rounds` (array): Golf: strokes per completed round.
  - Constraints: maxLength: 6
  - `items` (integer)
    - Constraints: minimum: 0
- `score` (string): Main figure as shown: golf to-par ('-12', 'E'), race gap ('+3.214', '+1 lap'), or points.
  - Constraints: maxLength: 16
- `shortName` (string): e.g. 'S. Scheffler', 'VER'.
  - Constraints: maxLength: 32
- `state` (string): Racing/golf status of this entrant.
  - Constraints: knownValues: active | finished | pit | out | cut | withdrawn | dnf | dsq
- `team` (string): Constructor or race team, e.g. 'Red Bull Racing', 'Hendrick Motorsports'.
  - Constraints: maxLength: 64
- `thru` (string): Golf: holes completed this round, 'F' when done.
  - Constraints: maxLength: 4
- `toPar` (integer): Golf: total relative to par.
- `today` (string): Golf: this round to par, e.g. '-4'.
  - Constraints: maxLength: 8

## #footballBoxScore (`com.professorbutts.sports.defs#footballBoxScore`)

Type: object

Football team stats.

### Properties

- `away` (ref, required)
  - Reference: `#footballTeamStats`
- `home` (ref, required)
  - Reference: `#footballTeamStats`

## #footballSituation (`com.professorbutts.sports.defs#footballSituation`)

Type: object

Football detail: who has the ball, down and distance, field position.

### Properties

- `distance` (integer)
  - Constraints: minimum: 0
- `down` (integer)
  - Constraints: minimum: 1, maximum: 4
- `possession` (string)
  - Constraints: knownValues: home | away
- `yardLine` (string)
  - Constraints: maxLength: 16

## #footballTeamStats (`com.professorbutts.sports.defs#footballTeamStats`)

Type: object

### Properties

- `firstDowns` (integer)
  - Constraints: minimum: 0
- `passingYards` (integer)
  - Constraints: minimum: 0
- `penalties` (integer)
  - Constraints: minimum: 0
- `rushingYards` (integer)
  - Constraints: minimum: 0
- `sacks` (integer)
  - Constraints: minimum: 0
- `thirdDowns` (string): e.g. '5-12'.
  - Constraints: maxLength: 8
- `timeOfPossession` (string): e.g. '31:12'.
  - Constraints: maxLength: 8
- `totalYards` (integer)
  - Constraints: minimum: 0
- `turnovers` (integer)
  - Constraints: minimum: 0

## #golfProgress (`com.professorbutts.sports.defs#golfProgress`)

Type: object

Golf tournament progress.

### Properties

- `cutLine` (string): Projected or actual cut, e.g. '+1'.
  - Constraints: maxLength: 8
- `playoff` (boolean)
- `round` (integer)
  - Constraints: minimum: 1, maximum: 6
- `totalRounds` (integer)
  - Constraints: minimum: 1, maximum: 6

## #hockeySituation (`com.professorbutts.sports.defs#hockeySituation`)

Type: object

Hockey detail.

### Properties

- `awaySkaters` (integer)
  - Constraints: minimum: 3, maximum: 6
- `emptyNet` (string)
  - Constraints: knownValues: home | away | both
- `homeSkaters` (integer)
  - Constraints: minimum: 3, maximum: 6
- `powerPlay` (string)
  - Constraints: knownValues: home | away

## #leaderboardSnapshot (`com.professorbutts.sports.defs#leaderboardSnapshot`)

Type: object

Copy of a leaderboard when a post was made: top of the field plus anyone the post is about. Also used for posts about a standings record.

### Properties

- `capturedAt` (string · datetime, required)
- `progress` (union): Where a leaderboard event stands. Open.
  - One of: `com.professorbutts.sports.defs#golfProgress`, `com.professorbutts.sports.defs#raceProgress`
- `standings` (array, required)
  - Constraints: maxLength: 10
  - `items` (ref)
    - Reference: `#entrant`
- `status` (string, required)
  - Constraints: knownValues: scheduled | live | halftime | final | postponed | canceled

## #lineScore (`com.professorbutts.sports.defs#lineScore`)

Type: object

Score by period, for any sport.

### Properties

- `periods` (array, required)
  - Constraints: maxLength: 30
  - `items` (ref)
    - Reference: `#periodScore`

## #member (`com.professorbutts.sports.defs#member`)

Type: object

A driver within a constructor/team standings row, with their own standing.

### Properties

- `name` (string, required)
  - Constraints: maxLength: 128
- `points` (integer)
  - Constraints: minimum: 0
- `position` (integer)
  - Constraints: minimum: 1
- `positionLabel` (string)
  - Constraints: maxLength: 8
- `score` (string)
  - Constraints: maxLength: 16
- `shortName` (string)
  - Constraints: maxLength: 32

## #period (`com.professorbutts.sports.defs#period`)

Type: object

### Properties

- `label` (string): Display label, e.g. 'Q3', 'Top 7th', '2nd Half', 'OT'.
  - Constraints: maxLength: 16
- `number` (integer, required)
  - Constraints: minimum: 0

## #periodScore (`com.professorbutts.sports.defs#periodScore`)

Type: object

### Properties

- `away` (integer, required)
  - Constraints: minimum: 0
- `home` (integer, required)
  - Constraints: minimum: 0
- `label` (string, required): e.g. 'Q1', '7', 'OT'.
  - Constraints: maxLength: 16

## #raceProgress (`com.professorbutts.sports.defs#raceProgress`)

Type: object

Motorsport race progress.

### Properties

- `flag` (string)
  - Constraints: knownValues: green | yellow | red | checkered | safetyCar | virtualSafetyCar | white
- `lap` (integer)
  - Constraints: minimum: 0
- `session` (string)
  - Constraints: knownValues: practice | qualifying | sprint | race
- `stage` (integer): NASCAR stage.
  - Constraints: minimum: 1
- `totalLaps` (integer)
  - Constraints: minimum: 0

## #snapshot (`com.professorbutts.sports.defs#snapshot`)

Type: object

Copy of the game state when a post was made. Game records are overwritten as the game goes on, so the post carries its own copy.

### Properties

- `awayScore` (integer, required)
  - Constraints: minimum: 0
- `capturedAt` (string · datetime, required)
- `clock` (string)
  - Constraints: maxLength: 16
- `homeScore` (integer, required)
  - Constraints: minimum: 0
- `period` (ref)
  - Reference: `#period`
- `situation` (union): Sport-specific live detail. Open: viewers skip types they don't know.
  - One of: `com.professorbutts.sports.defs#footballSituation`, `com.professorbutts.sports.defs#baseballSituation`, `com.professorbutts.sports.defs#basketballSituation`, `com.professorbutts.sports.defs#hockeySituation`, `com.professorbutts.sports.defs#soccerSituation`
- `status` (string, required)
  - Constraints: knownValues: scheduled | live | halftime | final | postponed | canceled

## #soccerSituation (`com.professorbutts.sports.defs#soccerSituation`)

Type: object

Soccer detail.

### Properties

- `awayRedCards` (integer)
  - Constraints: minimum: 0
- `homeRedCards` (integer)
  - Constraints: minimum: 0
- `stoppageTime` (string): Announced added minutes, e.g. '3'.
  - Constraints: maxLength: 4

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "baseballBoxScore": {
      "description": "Runs, hits, errors.",
      "properties": {
        "away": {
          "ref": "#baseballTeamLine",
          "type": "ref"
        },
        "home": {
          "ref": "#baseballTeamLine",
          "type": "ref"
        }
      },
      "required": [
        "home",
        "away"
      ],
      "type": "object"
    },
    "baseballSituation": {
      "description": "Baseball detail: count, outs and runners.",
      "properties": {
        "balls": {
          "maximum": 3,
          "minimum": 0,
          "type": "integer"
        },
        "onFirst": {
          "type": "boolean"
        },
        "onSecond": {
          "type": "boolean"
        },
        "onThird": {
          "type": "boolean"
        },
        "outs": {
          "maximum": 3,
          "minimum": 0,
          "type": "integer"
        },
        "strikes": {
          "maximum": 2,
          "minimum": 0,
          "type": "integer"
        }
      },
      "type": "object"
    },
    "baseballTeamLine": {
      "properties": {
        "errors": {
          "minimum": 0,
          "type": "integer"
        },
        "hits": {
          "minimum": 0,
          "type": "integer"
        },
        "leftOnBase": {
          "minimum": 0,
          "type": "integer"
        },
        "runs": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "runs",
        "hits",
        "errors"
      ],
      "type": "object"
    },
    "basketballBoxScore": {
      "description": "Basketball team stats.",
      "properties": {
        "away": {
          "ref": "#basketballTeamStats",
          "type": "ref"
        },
        "home": {
          "ref": "#basketballTeamStats",
          "type": "ref"
        }
      },
      "required": [
        "home",
        "away"
      ],
      "type": "object"
    },
    "basketballSituation": {
      "description": "Basketball detail.",
      "properties": {
        "awayFouls": {
          "minimum": 0,
          "type": "integer"
        },
        "awayTimeouts": {
          "minimum": 0,
          "type": "integer"
        },
        "bonus": {
          "description": "Which team is shooting bonus free throws.",
          "knownValues": [
            "home",
            "away",
            "both"
          ],
          "type": "string"
        },
        "homeFouls": {
          "description": "Team fouls this period.",
          "minimum": 0,
          "type": "integer"
        },
        "homeTimeouts": {
          "minimum": 0,
          "type": "integer"
        },
        "possession": {
          "knownValues": [
            "home",
            "away"
          ],
          "type": "string"
        }
      },
      "type": "object"
    },
    "basketballTeamStats": {
      "properties": {
        "assists": {
          "minimum": 0,
          "type": "integer"
        },
        "blocks": {
          "minimum": 0,
          "type": "integer"
        },
        "fieldGoals": {
          "description": "Made-attempted, e.g. '31-68'.",
          "maxLength": 8,
          "type": "string"
        },
        "freeThrows": {
          "maxLength": 8,
          "type": "string"
        },
        "rebounds": {
          "minimum": 0,
          "type": "integer"
        },
        "steals": {
          "minimum": 0,
          "type": "integer"
        },
        "threePointers": {
          "maxLength": 8,
          "type": "string"
        },
        "turnovers": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "type": "object"
    },
    "competitor": {
      "properties": {
        "abbreviation": {
          "maxLength": 8,
          "type": "string"
        },
        "color": {
          "description": "Primary hex color, e.g. '#FB4F14'.",
          "maxLength": 7,
          "type": "string"
        },
        "logo": {
          "accept": [
            "image/png",
            "image/svg+xml",
            "image/webp"
          ],
          "maxSize": 200000,
          "type": "blob"
        },
        "logoUrl": {
          "description": "Team logo image URL. Viewers may use it when there's no logo blob.",
          "format": "uri",
          "maxLength": 512,
          "type": "string"
        },
        "name": {
          "maxLength": 128,
          "type": "string"
        },
        "profile": {
          "description": "Optional atproto account for the team.",
          "format": "did",
          "type": "string"
        },
        "rank": {
          "description": "Poll ranking (college), e.g. 5 for #5.",
          "maximum": 99,
          "minimum": 1,
          "type": "integer"
        },
        "record": {
          "description": "Season record, e.g. '6-3'.",
          "maxLength": 16,
          "type": "string"
        },
        "score": {
          "minimum": 0,
          "type": "integer"
        },
        "secondaryColor": {
          "description": "Secondary hex color for stripes, e.g. '#000000'.",
          "maxLength": 7,
          "type": "string"
        }
      },
      "required": [
        "name",
        "score"
      ],
      "type": "object"
    },
    "entrant": {
      "description": "One player, driver or team in a leaderboard.",
      "properties": {
        "color": {
          "description": "Hex team color.",
          "maxLength": 7,
          "type": "string"
        },
        "country": {
          "description": "ISO 3166-1 alpha-3, for a flag.",
          "maxLength": 3,
          "type": "string"
        },
        "detail": {
          "description": "Secondary figure as shown, e.g. golf 'Thru 14', race '72 laps', a time '1:12.345'.",
          "maxLength": 16,
          "type": "string"
        },
        "laps": {
          "description": "Racing: laps completed.",
          "minimum": 0,
          "type": "integer"
        },
        "lapsLed": {
          "description": "Racing: laps led (NASCAR).",
          "minimum": 0,
          "type": "integer"
        },
        "members": {
          "description": "Standings: the drivers in a constructor or team, with their own places.",
          "items": {
            "ref": "#member",
            "type": "ref"
          },
          "maxLength": 4,
          "type": "array"
        },
        "name": {
          "maxLength": 128,
          "type": "string"
        },
        "number": {
          "description": "Car number.",
          "maxLength": 4,
          "type": "string"
        },
        "photoUrl": {
          "format": "uri",
          "maxLength": 512,
          "type": "string"
        },
        "points": {
          "description": "Points earned in this session, or season total on a standings record.",
          "minimum": 0,
          "type": "integer"
        },
        "position": {
          "description": "Numeric place, for sorting.",
          "minimum": 1,
          "type": "integer"
        },
        "positionLabel": {
          "description": "Place as shown, e.g. 'T3', 'CUT', 'DNF'.",
          "maxLength": 8,
          "type": "string"
        },
        "profile": {
          "description": "Optional atproto account.",
          "format": "did",
          "type": "string"
        },
        "rounds": {
          "description": "Golf: strokes per completed round.",
          "items": {
            "minimum": 0,
            "type": "integer"
          },
          "maxLength": 6,
          "type": "array"
        },
        "score": {
          "description": "Main figure as shown: golf to-par ('-12', 'E'), race gap ('+3.214', '+1 lap'), or points.",
          "maxLength": 16,
          "type": "string"
        },
        "shortName": {
          "description": "e.g. 'S. Scheffler', 'VER'.",
          "maxLength": 32,
          "type": "string"
        },
        "state": {
          "description": "Racing/golf status of this entrant.",
          "knownValues": [
            "active",
            "finished",
            "pit",
            "out",
            "cut",
            "withdrawn",
            "dnf",
            "dsq"
          ],
          "type": "string"
        },
        "team": {
          "description": "Constructor or race team, e.g. 'Red Bull Racing', 'Hendrick Motorsports'.",
          "maxLength": 64,
          "type": "string"
        },
        "thru": {
          "description": "Golf: holes completed this round, 'F' when done.",
          "maxLength": 4,
          "type": "string"
        },
        "toPar": {
          "description": "Golf: total relative to par.",
          "type": "integer"
        },
        "today": {
          "description": "Golf: this round to par, e.g. '-4'.",
          "maxLength": 8,
          "type": "string"
        }
      },
      "required": [
        "name"
      ],
      "type": "object"
    },
    "footballBoxScore": {
      "description": "Football team stats.",
      "properties": {
        "away": {
          "ref": "#footballTeamStats",
          "type": "ref"
        },
        "home": {
          "ref": "#footballTeamStats",
          "type": "ref"
        }
      },
      "required": [
        "home",
        "away"
      ],
      "type": "object"
    },
    "footballSituation": {
      "description": "Football detail: who has the ball, down and distance, field position.",
      "properties": {
        "distance": {
          "minimum": 0,
          "type": "integer"
        },
        "down": {
          "maximum": 4,
          "minimum": 1,
          "type": "integer"
        },
        "possession": {
          "knownValues": [
            "home",
            "away"
          ],
          "type": "string"
        },
        "yardLine": {
          "maxLength": 16,
          "type": "string"
        }
      },
      "type": "object"
    },
    "footballTeamStats": {
      "properties": {
        "firstDowns": {
          "minimum": 0,
          "type": "integer"
        },
        "passingYards": {
          "minimum": 0,
          "type": "integer"
        },
        "penalties": {
          "minimum": 0,
          "type": "integer"
        },
        "rushingYards": {
          "minimum": 0,
          "type": "integer"
        },
        "sacks": {
          "minimum": 0,
          "type": "integer"
        },
        "thirdDowns": {
          "description": "e.g. '5-12'.",
          "maxLength": 8,
          "type": "string"
        },
        "timeOfPossession": {
          "description": "e.g. '31:12'.",
          "maxLength": 8,
          "type": "string"
        },
        "totalYards": {
          "minimum": 0,
          "type": "integer"
        },
        "turnovers": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "type": "object"
    },
    "golfProgress": {
      "description": "Golf tournament progress.",
      "properties": {
        "cutLine": {
          "description": "Projected or actual cut, e.g. '+1'.",
          "maxLength": 8,
          "type": "string"
        },
        "playoff": {
          "type": "boolean"
        },
        "round": {
          "maximum": 6,
          "minimum": 1,
          "type": "integer"
        },
        "totalRounds": {
          "maximum": 6,
          "minimum": 1,
          "type": "integer"
        }
      },
      "type": "object"
    },
    "hockeySituation": {
      "description": "Hockey detail.",
      "properties": {
        "awaySkaters": {
          "maximum": 6,
          "minimum": 3,
          "type": "integer"
        },
        "emptyNet": {
          "knownValues": [
            "home",
            "away",
            "both"
          ],
          "type": "string"
        },
        "homeSkaters": {
          "maximum": 6,
          "minimum": 3,
          "type": "integer"
        },
        "powerPlay": {
          "knownValues": [
            "home",
            "away"
          ],
          "type": "string"
        }
      },
      "type": "object"
    },
    "leaderboardSnapshot": {
      "description": "Copy of a leaderboard when a post was made: top of the field plus anyone the post is about. Also used for posts about a standings record.",
      "properties": {
        "capturedAt": {
          "format": "datetime",
          "type": "string"
        },
        "progress": {
          "description": "Where a leaderboard event stands. Open.",
          "refs": [
            "com.professorbutts.sports.defs#golfProgress",
            "com.professorbutts.sports.defs#raceProgress"
          ],
          "type": "union"
        },
        "standings": {
          "items": {
            "ref": "#entrant",
            "type": "ref"
          },
          "maxLength": 10,
          "type": "array"
        },
        "status": {
          "knownValues": [
            "scheduled",
            "live",
            "halftime",
            "final",
            "postponed",
            "canceled"
          ],
          "type": "string"
        }
      },
      "required": [
        "capturedAt",
        "status",
        "standings"
      ],
      "type": "object"
    },
    "lineScore": {
      "description": "Score by period, for any sport.",
      "properties": {
        "periods": {
          "items": {
            "ref": "#periodScore",
            "type": "ref"
          },
          "maxLength": 30,
          "type": "array"
        }
      },
      "required": [
        "periods"
      ],
      "type": "object"
    },
    "member": {
      "description": "A driver within a constructor/team standings row, with their own standing.",
      "properties": {
        "name": {
          "maxLength": 128,
          "type": "string"
        },
        "points": {
          "minimum": 0,
          "type": "integer"
        },
        "position": {
          "minimum": 1,
          "type": "integer"
        },
        "positionLabel": {
          "maxLength": 8,
          "type": "string"
        },
        "score": {
          "maxLength": 16,
          "type": "string"
        },
        "shortName": {
          "maxLength": 32,
          "type": "string"
        }
      },
      "required": [
        "name"
      ],
      "type": "object"
    },
    "period": {
      "properties": {
        "label": {
          "description": "Display label, e.g. 'Q3', 'Top 7th', '2nd Half', 'OT'.",
          "maxLength": 16,
          "type": "string"
        },
        "number": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "number"
      ],
      "type": "object"
    },
    "periodScore": {
      "properties": {
        "away": {
          "minimum": 0,
          "type": "integer"
        },
        "home": {
          "minimum": 0,
          "type": "integer"
        },
        "label": {
          "description": "e.g. 'Q1', '7', 'OT'.",
          "maxLength": 16,
          "type": "string"
        }
      },
      "required": [
        "label",
        "home",
        "away"
      ],
      "type": "object"
    },
    "raceProgress": {
      "description": "Motorsport race progress.",
      "properties": {
        "flag": {
          "knownValues": [
            "green",
            "yellow",
            "red",
            "checkered",
            "safetyCar",
            "virtualSafetyCar",
            "white"
          ],
          "type": "string"
        },
        "lap": {
          "minimum": 0,
          "type": "integer"
        },
        "session": {
          "knownValues": [
            "practice",
            "qualifying",
            "sprint",
            "race"
          ],
          "type": "string"
        },
        "stage": {
          "description": "NASCAR stage.",
          "minimum": 1,
          "type": "integer"
        },
        "totalLaps": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "type": "object"
    },
    "snapshot": {
      "description": "Copy of the game state when a post was made. Game records are overwritten as the game goes on, so the post carries its own copy.",
      "properties": {
        "awayScore": {
          "minimum": 0,
          "type": "integer"
        },
        "capturedAt": {
          "format": "datetime",
          "type": "string"
        },
        "clock": {
          "maxLength": 16,
          "type": "string"
        },
        "homeScore": {
          "minimum": 0,
          "type": "integer"
        },
        "period": {
          "ref": "#period",
          "type": "ref"
        },
        "situation": {
          "description": "Sport-specific live detail. Open: viewers skip types they don't know.",
          "refs": [
            "com.professorbutts.sports.defs#footballSituation",
            "com.professorbutts.sports.defs#baseballSituation",
            "com.professorbutts.sports.defs#basketballSituation",
            "com.professorbutts.sports.defs#hockeySituation",
            "com.professorbutts.sports.defs#soccerSituation"
          ],
          "type": "union"
        },
        "status": {
          "knownValues": [
            "scheduled",
            "live",
            "halftime",
            "final",
            "postponed",
            "canceled"
          ],
          "type": "string"
        }
      },
      "required": [
        "capturedAt",
        "status",
        "homeScore",
        "awayScore"
      ],
      "type": "object"
    },
    "soccerSituation": {
      "description": "Soccer detail.",
      "properties": {
        "awayRedCards": {
          "minimum": 0,
          "type": "integer"
        },
        "homeRedCards": {
          "minimum": 0,
          "type": "integer"
        },
        "stoppageTime": {
          "description": "Announced added minutes, e.g. '3'.",
          "maxLength": 4,
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "description": "Shared types for com.professorbutts.sports records and the post-side scoreboard field.",
  "id": "com.professorbutts.sports.defs",
  "lexicon": 1
}
```
