games.atplay.game.createTurn

atplay.games

Documentation

Publish a turn. The appview writes it to the caller's repo, from where the other players pick it up. Actions may be empty for the negotiation steps middleware drives (ADR 0028). The caller must have stored any secrets this turn depends on first (ADR 0030).

main procedure

Publish a turn. The appview writes it to the caller's repo, from where the other players pick it up. Actions may be empty for the negotiation steps middleware drives (ADR 0028). The caller must have stored any secrets this turn depends on first (ADR 0030).

Input

Encodingapplication/json
actions array Optional

The actions taken by this player in this game, created & interpretable by the game logic (but ideally also human readable). May be empty: setup negotiation (commit/reveal, shuffles) advances the state without any human action.

follows array Optional

The record(s) that this new game state is based upon. This is usually the single previous turn (or the invitation, for the first turn), but for games where turns can be taken parallel for a given round, this may contain more than one record.

minLength: 1 items
nextPlayers array Optional

Array of DIDs for the next player(s) to take a turn. Duplicates state.individual.[].player (where active is true) so appviews can answer 'whose turn is it' without deserialising the state. Absent means the game is over.

minLength: 1 items

Output

Encodingapplication/json
cid string Optional

No description available.

uri string Required

No description available.

Try It

Requests are sent directly from your browser. Some servers may block requests due to CORS.

Base URL for XRPC calls (e.g., https://bsky.social)
Enter valid JSON for the request body
View raw schema
{
  "type": "procedure",
  "input": {
    "schema": {
      "type": "object",
      "properties": {
        "game": {
          "ref": "games.atplay.game.release",
          "type": "ref"
        },
        "state": {
          "ref": "games.atplay.game.state",
          "type": "ref"
        },
        "actions": {
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 1024
          },
          "description": "The actions taken by this player in this game, created & interpretable by the game logic (but ideally also human readable). May be empty: setup negotiation (commit/reveal, shuffles) advances the state without any human action."
        },
        "follows": {
          "type": "array",
          "items": {
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          },
          "minLength": 1,
          "description": "The record(s) that this new game state is based upon. This is usually the single previous turn (or the invitation, for the first turn), but for games where turns can be taken parallel for a given round, this may contain more than one record."
        },
        "invitation": {
          "ref": "com.atproto.repo.strongRef",
          "type": "ref",
          "description": "Reference to the game invitation record"
        },
        "nextPlayers": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "did"
          },
          "minLength": 1,
          "description": "Array of DIDs for the next player(s) to take a turn. Duplicates state.individual.[].player (where active is true) so appviews can answer 'whose turn is it' without deserialising the state. Absent means the game is over."
        }
      }
    },
    "encoding": "application/json"
  },
  "output": {
    "schema": {
      "type": "object",
      "required": [
        "uri"
      ],
      "properties": {
        "cid": {
          "type": "string",
          "maxLength": 256
        },
        "uri": {
          "type": "string",
          "maxLength": 512
        }
      }
    },
    "encoding": "application/json"
  },
  "description": "Publish a turn. The appview writes it to the caller's repo, from where the other players pick it up. Actions may be empty for the negotiation steps middleware drives (ADR 0028). The caller must have stored any secrets this turn depends on first (ADR 0030)."
}

Lexicon Garden

@