# xyz.opnshelf.mediaLink

> Published by [opnshelf.xyz](https://lexicon.garden/identity/did:plc:jkf4momksftvstbyqnb5sxik)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:jkf4momksftvstbyqnb5sxik/xyz.opnshelf.mediaLink)
- [Documentation](https://lexicon.garden/lexicon/did:plc:jkf4momksftvstbyqnb5sxik/xyz.opnshelf.mediaLink/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:jkf4momksftvstbyqnb5sxik/xyz.opnshelf.mediaLink/examples)

## Definitions

### `xyz.opnshelf.mediaLink`

**Type**: `object`

An embedded, typed link binding a standard.site document to an OpnShelf media item. Placed inside a document's open `links` union; gets no collection and no record of its own.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `mediaId` | `string` | Yes | TMDB movie ID or show ID |
| `mediaType` | `string` | Yes | Media type |
| `seasonNumber` | `integer` | No | Season number for season/episode items |
| `episodeNumber` | `integer` | No | Episode number for episode items |

## Raw Schema

```json
{
  "id": "xyz.opnshelf.mediaLink",
  "defs": {
    "main": {
      "type": "object",
      "required": [
        "mediaType",
        "mediaId"
      ],
      "properties": {
        "mediaId": {
          "type": "string",
          "description": "TMDB movie ID or show ID"
        },
        "mediaType": {
          "enum": [
            "movie",
            "show",
            "season",
            "episode"
          ],
          "type": "string",
          "description": "Media type"
        },
        "seasonNumber": {
          "type": "integer",
          "description": "Season number for season/episode items"
        },
        "episodeNumber": {
          "type": "integer",
          "description": "Episode number for episode items"
        }
      },
      "description": "An embedded, typed link binding a standard.site document to an OpnShelf media item. Placed inside a document's open `links` union; gets no collection and no record of its own."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
