games.cavu.createPostDraft

Draft a Bluesky post for the bound player (bound session + DPoP; the game needs games.cavu.defs#bskyPost). Returns a link to the host's composer: show it in an iframe on the game's page. The player edits the post and sends it, or cancels; the composer tells the page by postMessage({type: 'cavu.compose', status: 'open' | 'posted' | 'cancelled' | 'expired', uri?, url?}, <game origin>). A game can't post without the player sending it from the composer.

Repository @pardy.at did:plc:dp7v5b5kejmmzzpwmqyf5wj6 namespace authority
Details · procedure
Kindprocedure
Authoritycavu.games
Commit rev3n2ylmgu57x4u
Indexed
cid bafyreies2a7tnvrk6xmksum4jnh543amjmcpwlp3xwahhfempkij7fvugi

Checks

Valid
  • unlimited-string defs.main.input.schema.properties.image.properties.dataNo maxLength, maxGraphemes or format limits this string.
JSONDownload
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Draft a Bluesky post for the bound player (bound session + DPoP; the game needs games.cavu.defs#bskyPost). Returns a link to the host's composer: show it in an iframe on the game's page. The player edits the post and sends it, or cancels; the composer tells the page by postMessage({type: 'cavu.compose', status: 'open' | 'posted' | 'cancelled' | 'expired', uri?, url?}, <game origin>). A game can't post without the player sending it from the composer.",
      "errors": [
        {
          "description": "The game doesn't declare games.cavu.defs#bskyPost.",
          "name": "CapabilityRequired"
        },
        {
          "name": "InvalidImage"
        },
        {
          "name": "InvalidRequest"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "image": {
              "properties": {
                "alt": {
                  "description": "Starting alt text; the player can change it.",
                  "maxLength": 2000,
                  "type": "string"
                },
                "data": {
                  "description": "Base64 (standard alphabet) of a JPEG, PNG or WebP, at most 1,000,000 bytes.",
                  "type": "string"
                },
                "height": {
                  "minimum": 1,
                  "type": "integer"
                },
                "width": {
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "required": [
                "data"
              ],
              "type": "object"
            },
            "text": {
              "description": "The post's text to start from; the player can change it.",
              "maxGraphemes": 300,
              "maxLength": 3000,
              "type": "string"
            }
          },
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "expiresAt": {
              "format": "datetime",
              "type": "string"
            },
            "url": {
              "description": "The composer for this draft (only the player's own browser can post from it; only the game's page origin may frame it).",
              "format": "uri",
              "type": "string"
            }
          },
          "required": [
            "url",
            "expiresAt"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "games.cavu.createPostDraft",
  "lexicon": 1
}