{
"id": "games.atplay.listInvitations",
"defs": {
"main": {
"type": "query",
"output": {
"schema": {
"type": "object",
"required": [
"games"
],
"properties": {
"games": {
"type": "array",
"items": {
"ref": "#gameSummary",
"type": "ref"
}
},
"cursor": {
"type": "string",
"maxLength": 512,
"description": "Cursor for the next page, absent if no more results."
}
}
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"properties": {
"limit": {
"type": "integer",
"default": 50,
"maximum": 100,
"minimum": 1,
"description": "Maximum number of games to return."
},
"cursor": {
"type": "string",
"maxLength": 512,
"description": "Pagination cursor."
},
"player": {
"type": "string",
"format": "did",
"description": "Whose games to list. Defaults to the authenticated caller."
}
}
},
"description": "List the games a player is part of — ones they started and ones they were invited to — newest first."
},
"gameSummary": {
"type": "object",
"required": [
"invitation",
"turnCount",
"pending",
"yourMove"
],
"properties": {
"game": {
"ref": "games.atplay.game.release",
"type": "ref",
"description": "The release the invitation named."
},
"pending": {
"type": "boolean",
"description": "True while nobody has taken a turn. Acceptance is the invitee's first turn, so an unanswered invitation stays pending (ADR 0031)."
},
"players": {
"type": "array",
"items": {
"type": "string",
"format": "did"
},
"description": "The players invited, not counting the initiator."
},
"yourMove": {
"type": "boolean",
"description": "True when the latest turn names this player as one of the next to act."
},
"initiator": {
"type": "string",
"format": "did",
"description": "Who sent the invitation."
},
"turnCount": {
"type": "integer",
"minimum": 0,
"description": "How many turns have been published against this invitation."
},
"invitation": {
"type": "string",
"format": "at-uri",
"maxLength": 512,
"description": "The invitation that started this game."
},
"latestTurn": {
"type": "string",
"format": "at-uri",
"maxLength": 512,
"description": "The most recent turn, absent while the game is still pending."
}
},
"description": "One game a player is part of, with just enough to list and rejoin it."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}