# gg.infinitetavern.tavern.getAdventurerCodex

> Published by [infinitetavern.gg](https://lexicon.garden/identity/did:plc:vxwgn77hp5ikvbiggm5es3rv)

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:vxwgn77hp5ikvbiggm5es3rv/gg.infinitetavern.tavern.getAdventurerCodex)
- [Documentation](https://lexicon.garden/lexicon/did:plc:vxwgn77hp5ikvbiggm5es3rv/gg.infinitetavern.tavern.getAdventurerCodex/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:vxwgn77hp5ikvbiggm5es3rv/gg.infinitetavern.tavern.getAdventurerCodex/examples)

## Definitions

### `gg.infinitetavern.tavern.getAdventurerCodex`

**Type**: `query`

Retrieve a player's Adventurer's Codex — their portable character sheet with titles, labels, and career summary.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `did` | `string` (did) | Yes | The DID of the adventurer whose codex to retrieve. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `codex` | unknown | Yes | The player's codex, or null if no codex record exists. |

### `gg.infinitetavern.tavern.getAdventurerCodex#codexView`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `did` | `string` (did) | Yes | The adventurer's DID. |
| `updatedAt` | `string` (datetime) | Yes | Last codex update timestamp. |
| `peakRenown` | `number` | Yes | Peak MMR (Renown). |
| `activeTitle` | `string` | No | Key of the player's active display title. |
| `gamesPlayed` | `integer` | Yes | Total games played. |
| `earnedLabels` | `array` | Yes | Keys of all earned labels. |
| `earnedTitles` | `array` | Yes | Keys of all earned titles. |
| `favoriteHero` | `string` | No | Most-played hero key. |
| `championships` | `integer` | Yes | Total first-place finishes. |
| `activeTitleTier` | `string` | No | Rarity tier of the active title. |
| `activeTitleDisplay` | `string` | No | Display name of the active title. |

## Raw Schema

```json
{
  "id": "gg.infinitetavern.tavern.getAdventurerCodex",
  "defs": {
    "main": {
      "type": "query",
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "codex"
          ],
          "properties": {
            "codex": {
              "$ref": "#/defs/codexView",
              "description": "The player's codex, or null if no codex record exists."
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "required": [
          "did"
        ],
        "properties": {
          "did": {
            "type": "string",
            "format": "did",
            "description": "The DID of the adventurer whose codex to retrieve."
          }
        }
      },
      "description": "Retrieve a player's Adventurer's Codex — their portable character sheet with titles, labels, and career summary."
    },
    "codexView": {
      "type": "object",
      "required": [
        "did",
        "earnedTitles",
        "earnedLabels",
        "gamesPlayed",
        "championships",
        "peakRenown",
        "updatedAt"
      ],
      "properties": {
        "did": {
          "type": "string",
          "format": "did",
          "description": "The adventurer's DID."
        },
        "updatedAt": {
          "type": "string",
          "format": "datetime",
          "description": "Last codex update timestamp."
        },
        "peakRenown": {
          "type": "number",
          "description": "Peak MMR (Renown)."
        },
        "activeTitle": {
          "type": "string",
          "description": "Key of the player's active display title."
        },
        "gamesPlayed": {
          "type": "integer",
          "description": "Total games played."
        },
        "earnedLabels": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Keys of all earned labels."
        },
        "earnedTitles": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Keys of all earned titles."
        },
        "favoriteHero": {
          "type": "string",
          "description": "Most-played hero key."
        },
        "championships": {
          "type": "integer",
          "description": "Total first-place finishes."
        },
        "activeTitleTier": {
          "type": "string",
          "description": "Rarity tier of the active title."
        },
        "activeTitleDisplay": {
          "type": "string",
          "description": "Display name of the active title."
        }
      }
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
