{
"id": "pet.trezy.getStats",
"defs": {
"main": {
"type": "query",
"output": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string"
},
"level": {
"type": "integer"
},
"hunger": {
"type": "integer"
},
"happiness": {
"type": "integer"
},
"hungerPips": {
"type": "array",
"items": {
"type": "integer"
}
},
"happinessPips": {
"type": "array",
"items": {
"type": "integer"
}
},
"totalInteractions": {
"type": "integer"
},
"interactionCooldown": {
"type": "integer",
"minimum": 1,
"description": "The full cooldown length in seconds, from pet.trezy.gameConfig. Lets a client start a countdown the instant it acts, without waiting a round trip and without hardcoding the number."
},
"petCooldownRemaining": {
"type": "integer",
"minimum": 0,
"description": "Seconds until this pet can be petted again, or 0 if it can be now."
},
"feedCooldownRemaining": {
"type": "integer",
"minimum": 0,
"description": "Seconds until this pet can be fed again, or 0 if it can be now. Reported so the client can show a countdown and disable the button on the real rule, rather than on a copy of the cooldown it keeps itself and discovers is wrong by being refused."
}
}
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"required": [
"did",
"pet"
],
"properties": {
"did": {
"type": "string",
"format": "did"
},
"pet": {
"type": "string",
"format": "at-uri"
}
}
}
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}