# quest.cozysky.getGames

> Games from the indexed games.atmosphere.define records that read or write a given collection (in uses[] or requires[], actor.rpg.sprite by default) and play in a browser: category 'browser', an http(s) url, and not 'coming' or 'archived'. One per url (the developer's own record wins over one held for them), most recently updated first. Served by getGames.lua.

- Kind: query
- Authority: cozysky.quest
- Lexicon: 1
- Published by [cozysky.quest](https://lexicon.garden/identity/did:plc:r3t343mn4ksrkgzustdwj5iv), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:r3t343mn4ksrkgzustdwj5iv/quest.cozysky.getGames)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:r3t343mn4ksrkgzustdwj5iv/quest.cozysky.getGames/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:r3t343mn4ksrkgzustdwj5iv/quest.cozysky.getGames/analytics)

## Query (`quest.cozysky.getGames`)

Type: query · GET

### Parameters (query string)

- `exclude` (string): Comma-separated publisher DIDs to leave out.
- `limit` (integer)
  - Constraints: minimum: 1, maximum: 100, default: 30
- `uses` (string · nsid): Collection the game must use.
  - Constraints: default: "actor.rpg.sprite"

### Output (application/json)

- `games` (array, required)
  - `items` (ref)
    - Reference: `#game`

## #game (`quest.cozysky.getGames#game`)

Type: object

### Properties

- `cover` (string): CID of the cover blob in did's repo, if any.
- `did` (string · did, required): The repo it is published in.
- `icon` (string): CID of the icon blob in did's repo, if any.
- `name` (string, required)
- `status` (string)
- `tagline` (string)
- `updatedAt` (string · datetime)
- `uri` (string · at-uri, required): The games.atmosphere.define record.
- `url` (string · uri, required): Where to play it.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "game": {
      "properties": {
        "cover": {
          "description": "CID of the cover blob in did's repo, if any.",
          "type": "string"
        },
        "did": {
          "description": "The repo it is published in.",
          "format": "did",
          "type": "string"
        },
        "icon": {
          "description": "CID of the icon blob in did's repo, if any.",
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "tagline": {
          "type": "string"
        },
        "updatedAt": {
          "format": "datetime",
          "type": "string"
        },
        "uri": {
          "description": "The games.atmosphere.define record.",
          "format": "at-uri",
          "type": "string"
        },
        "url": {
          "description": "Where to play it.",
          "format": "uri",
          "type": "string"
        }
      },
      "required": [
        "uri",
        "did",
        "name",
        "url"
      ],
      "type": "object"
    },
    "main": {
      "description": "Games from the indexed games.atmosphere.define records that read or write a given collection (in uses[] or requires[], actor.rpg.sprite by default) and play in a browser: category 'browser', an http(s) url, and not 'coming' or 'archived'. One per url (the developer's own record wins over one held for them), most recently updated first. Served by getGames.lua.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "games": {
              "items": {
                "ref": "#game",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "games"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "exclude": {
            "description": "Comma-separated publisher DIDs to leave out.",
            "type": "string"
          },
          "limit": {
            "default": 30,
            "maximum": 100,
            "minimum": 1,
            "type": "integer"
          },
          "uses": {
            "default": "actor.rpg.sprite",
            "description": "Collection the game must use.",
            "format": "nsid",
            "type": "string"
          }
        },
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "quest.cozysky.getGames",
  "lexicon": 1
}
```
