# games.cavu.addon

> Content a player made for a game, such as a Tier Madness category or criterion. It lives in its author's repo; the game uses it only once the game's publisher approves it (a games.cavu.approval whose subject is this record's exact version, so an edit needs approving again). rkey MUST be '<game>:<id>' (a TID); readers reject records whose rkey doesn't start with their own `game`.

- Kind: record
- Record key: any
- Authority: cavu.games
- Lexicon: 1
- Published by [pardy.at](https://lexicon.garden/identity/did:plc:dp7v5b5kejmmzzpwmqyf5wj6), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:dp7v5b5kejmmzzpwmqyf5wj6/games.cavu.addon)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:dp7v5b5kejmmzzpwmqyf5wj6/games.cavu.addon/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:dp7v5b5kejmmzzpwmqyf5wj6/games.cavu.addon/analytics)

## Record (`games.cavu.addon`)

Type: record · key any

### Properties

- `createdAt` (string · datetime, required)
- `description` (string)
  - Constraints: maxLength: 3000, maxGraphemes: 300
- `details` (unknown): Game-specific, typed by the game: an object with $type in the game's own lexicon.
- `game` (ref, required)
  - Reference: `games.cavu.defs#slug`
- `image` (blob): Cover art.
  - Constraints: maxSize: 1000000, accept: image/png, image/jpeg, image/webp
- `imageAlt` (string)
  - Constraints: maxLength: 3000, maxGraphemes: 300
- `items` (array): The things in it, when it is a list (a category's entries). A single-line add-on (a criterion) leaves it out.
  - Constraints: maxLength: 200
  - `items` (ref)
    - Reference: `#item`
- `kind` (string, required): What sort of add-on, in the game's own terms (e.g. Tier Madness: 'category', 'criteria').
  - Constraints: maxLength: 32
- `name` (string, required)
  - Constraints: maxLength: 640, maxGraphemes: 64
- `updatedAt` (string · datetime)

## #item (`games.cavu.addon#item`)

Type: object

### Properties

- `description` (string)
  - Constraints: maxLength: 3000, maxGraphemes: 300
- `image` (blob)
  - Constraints: maxSize: 1000000, accept: image/png, image/jpeg, image/webp
- `imageAlt` (string)
  - Constraints: maxLength: 3000, maxGraphemes: 300
- `imageUrl` (string · uri): An image hosted elsewhere (e.g. a Wikimedia Commons thumbnail), when there is no `image` blob. `source` credits it.
  - Constraints: maxLength: 2000
- `name` (string, required)
  - Constraints: maxLength: 640, maxGraphemes: 64
- `source` (string · uri): Where the image (or the item) came from, for credit (e.g. the Wikipedia article).

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "item": {
      "properties": {
        "description": {
          "maxGraphemes": 300,
          "maxLength": 3000,
          "type": "string"
        },
        "image": {
          "accept": [
            "image/png",
            "image/jpeg",
            "image/webp"
          ],
          "maxSize": 1000000,
          "type": "blob"
        },
        "imageAlt": {
          "maxGraphemes": 300,
          "maxLength": 3000,
          "type": "string"
        },
        "imageUrl": {
          "description": "An image hosted elsewhere (e.g. a Wikimedia Commons thumbnail), when there is no `image` blob. `source` credits it.",
          "format": "uri",
          "maxLength": 2000,
          "type": "string"
        },
        "name": {
          "maxGraphemes": 64,
          "maxLength": 640,
          "type": "string"
        },
        "source": {
          "description": "Where the image (or the item) came from, for credit (e.g. the Wikipedia article).",
          "format": "uri",
          "type": "string"
        }
      },
      "required": [
        "name"
      ],
      "type": "object"
    },
    "main": {
      "description": "Content a player made for a game, such as a Tier Madness category or criterion. It lives in its author's repo; the game uses it only once the game's publisher approves it (a games.cavu.approval whose subject is this record's exact version, so an edit needs approving again). rkey MUST be '<game>:<id>' (a TID); readers reject records whose rkey doesn't start with their own `game`.",
      "key": "any",
      "record": {
        "properties": {
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "description": {
            "maxGraphemes": 300,
            "maxLength": 3000,
            "type": "string"
          },
          "details": {
            "description": "Game-specific, typed by the game: an object with $type in the game's own lexicon.",
            "type": "unknown"
          },
          "game": {
            "ref": "games.cavu.defs#slug",
            "type": "ref"
          },
          "image": {
            "accept": [
              "image/png",
              "image/jpeg",
              "image/webp"
            ],
            "description": "Cover art.",
            "maxSize": 1000000,
            "type": "blob"
          },
          "imageAlt": {
            "maxGraphemes": 300,
            "maxLength": 3000,
            "type": "string"
          },
          "items": {
            "description": "The things in it, when it is a list (a category's entries). A single-line add-on (a criterion) leaves it out.",
            "items": {
              "ref": "#item",
              "type": "ref"
            },
            "maxLength": 200,
            "type": "array"
          },
          "kind": {
            "description": "What sort of add-on, in the game's own terms (e.g. Tier Madness: 'category', 'criteria').",
            "maxLength": 32,
            "type": "string"
          },
          "name": {
            "maxGraphemes": 64,
            "maxLength": 640,
            "type": "string"
          },
          "updatedAt": {
            "format": "datetime",
            "type": "string"
          }
        },
        "required": [
          "game",
          "kind",
          "name",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "games.cavu.addon",
  "lexicon": 1
}
```
