games.gamesgamesgamesgames.toggleListItem

Add or remove a game from a list. Creates a listItem if none exists, deletes it if one does.

Details · procedure
Kindprocedure
Authoritygamesgamesgamesgames.games
Indexed
cid bafyreibdxomtjpncxno4vyn3huutmz57w5hk4ikgh4eqtwovwuj7k25dcu

Checks

Valid
  • unlimited-string defs.main.output.schema.properties.actionNo maxLength, maxGraphemes or format limits this string.
  • unlimited-string defs.main.output.schema.properties.cidNo maxLength, maxGraphemes or format limits this string.
JSONDownload
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Add or remove a game from a list. Creates a listItem if none exists, deletes it if one does.",
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "gameUri": {
              "description": "AT URI of the game record.",
              "format": "at-uri",
              "type": "string"
            },
            "listUri": {
              "description": "AT URI of the list.",
              "format": "at-uri",
              "type": "string"
            }
          },
          "required": [
            "listUri",
            "gameUri"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "action": {
              "description": "Whether the game was added to or removed from the list.",
              "knownValues": [
                "added",
                "removed"
              ],
              "type": "string"
            },
            "cid": {
              "description": "CID of the created listItem record. Present when action is 'added'.",
              "type": "string"
            },
            "uri": {
              "description": "AT URI of the created listItem record. Present when action is 'added'.",
              "format": "at-uri",
              "type": "string"
            }
          },
          "required": [
            "action"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "games.gamesgamesgamesgames.toggleListItem",
  "lexicon": 1
}