# com.professorbutts.sports.league

> Record key is the league code used as the first part of every slug, e.g. 'nfl', 'cfb', 'cfb-fcs', 'f1', 'nascar', 'epl'. Lowercase a-z, 0-9 and '-'. Never reused once minted.

- Kind: record
- Record key: any
- 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.league)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:x6njyeyi47bqs2kueuv3mrg5/com.professorbutts.sports.league/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:x6njyeyi47bqs2kueuv3mrg5/com.professorbutts.sports.league/analytics)

## Record (`com.professorbutts.sports.league`)

Type: record · key any

### Properties

- `ageGroup` (string): Same values as team.ageGroup. Leave out for the senior game, e.g. 'under-20' for an under-20 World Cup.
  - Constraints: maxLength: 32, knownValues: senior | under-23 | under-21 | under-20 | under-19 | under-18
- `aliases` (array): Other names people use, e.g. 'Premier League', 'EPL'.
  - Constraints: maxLength: 16
  - `items` (string)
    - Constraints: maxLength: 64
- `category` (string): What kind of competition this is, using 2nd Screen's values: 'league' has a season table (a college division such as FCS is a league with a parent), 'tournament' is a single event like a World Cup, 'series' is a season of separate events with their own results (motorsport series, golf tours), 'fixture-group' is a loose set of games like international friendlies.
  - Constraints: maxLength: 32, knownValues: league | tournament | series | fixture-group
- `country` (string): ISO 3166-1 alpha-3, when the league is national.
  - Constraints: maxLength: 3
- `discipline` (string): Same values as team.discipline. Leave out for the standard game.
  - Constraints: maxLength: 32, knownValues: standard | wheelchair | intellectual-disability | physical-disability
- `externalIds` (array)
  - Constraints: maxLength: 16
  - `items` (ref)
    - Reference: `com.professorbutts.sports.defs#externalId`
- `gender` (string)
  - Constraints: maxLength: 16, knownValues: men | women | mixed
- `level` (string)
  - Constraints: maxLength: 32, knownValues: pro | college | international | minor | amateur
- `multiSport` (boolean): True exactly when sport is 'multi', e.g. the Olympics.
- `name` (string, required): e.g. 'NCAA Division I FCS Football'.
  - Constraints: maxLength: 128
- `parent` (string · at-uri): Wider league this is part of, e.g. 'cfb-fcs' points at 'cfb'. Teams that move between divisions keep their slug under the parent code.
- `shortName` (string): e.g. 'FCS'.
  - Constraints: maxLength: 32
- `sport` (string, required)
  - Constraints: maxLength: 64, knownValues: football | basketball | baseball | hockey | soccer | rugby | golf | motorsport | cricket | multi
- `teamPrefix` (string): League code used in this league's team slugs, when it differs from the record key, e.g. 'cfb' for 'cfb-fcs'.
  - Constraints: maxLength: 32
- `updatedAt` (string · datetime, required)

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Record key is the league code used as the first part of every slug, e.g. 'nfl', 'cfb', 'cfb-fcs', 'f1', 'nascar', 'epl'. Lowercase a-z, 0-9 and '-'. Never reused once minted.",
      "key": "any",
      "record": {
        "properties": {
          "ageGroup": {
            "description": "Same values as team.ageGroup. Leave out for the senior game, e.g. 'under-20' for an under-20 World Cup.",
            "knownValues": [
              "senior",
              "under-23",
              "under-21",
              "under-20",
              "under-19",
              "under-18"
            ],
            "maxLength": 32,
            "type": "string"
          },
          "aliases": {
            "description": "Other names people use, e.g. 'Premier League', 'EPL'.",
            "items": {
              "maxLength": 64,
              "type": "string"
            },
            "maxLength": 16,
            "type": "array"
          },
          "category": {
            "description": "What kind of competition this is, using 2nd Screen's values: 'league' has a season table (a college division such as FCS is a league with a parent), 'tournament' is a single event like a World Cup, 'series' is a season of separate events with their own results (motorsport series, golf tours), 'fixture-group' is a loose set of games like international friendlies.",
            "knownValues": [
              "league",
              "tournament",
              "series",
              "fixture-group"
            ],
            "maxLength": 32,
            "type": "string"
          },
          "country": {
            "description": "ISO 3166-1 alpha-3, when the league is national.",
            "maxLength": 3,
            "type": "string"
          },
          "discipline": {
            "description": "Same values as team.discipline. Leave out for the standard game.",
            "knownValues": [
              "standard",
              "wheelchair",
              "intellectual-disability",
              "physical-disability"
            ],
            "maxLength": 32,
            "type": "string"
          },
          "externalIds": {
            "items": {
              "ref": "com.professorbutts.sports.defs#externalId",
              "type": "ref"
            },
            "maxLength": 16,
            "type": "array"
          },
          "gender": {
            "knownValues": [
              "men",
              "women",
              "mixed"
            ],
            "maxLength": 16,
            "type": "string"
          },
          "level": {
            "knownValues": [
              "pro",
              "college",
              "international",
              "minor",
              "amateur"
            ],
            "maxLength": 32,
            "type": "string"
          },
          "multiSport": {
            "description": "True exactly when sport is 'multi', e.g. the Olympics.",
            "type": "boolean"
          },
          "name": {
            "description": "e.g. 'NCAA Division I FCS Football'.",
            "maxLength": 128,
            "type": "string"
          },
          "parent": {
            "description": "Wider league this is part of, e.g. 'cfb-fcs' points at 'cfb'. Teams that move between divisions keep their slug under the parent code.",
            "format": "at-uri",
            "type": "string"
          },
          "shortName": {
            "description": "e.g. 'FCS'.",
            "maxLength": 32,
            "type": "string"
          },
          "sport": {
            "knownValues": [
              "football",
              "basketball",
              "baseball",
              "hockey",
              "soccer",
              "rugby",
              "golf",
              "motorsport",
              "cricket",
              "multi"
            ],
            "maxLength": 64,
            "type": "string"
          },
          "teamPrefix": {
            "description": "League code used in this league's team slugs, when it differs from the record key, e.g. 'cfb' for 'cfb-fcs'.",
            "maxLength": 32,
            "type": "string"
          },
          "updatedAt": {
            "format": "datetime",
            "type": "string"
          }
        },
        "required": [
          "name",
          "sport",
          "updatedAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "description": "A league, tour, series or college division. Gives every league code used in team, game and leaderboard slugs a record of its own, so others can look codes up.",
  "id": "com.professorbutts.sports.league",
  "lexicon": 1
}
```
