pet.trezy.getStats

Repository @trezy.pet did:plc:ollch4g7tes2reb5eceiwuol namespace authority
Details · query
Kindquery
Authoritytrezy.pet
Indexed

Query

query · GET

Parameters

query string

did

requiredstring · did

pet

requiredstring · at-uri

Output

application/json

asleep

boolean

Whether this pet's species is inside one of its published sleep windows right now, in which case createInteraction refuses a feed or a pet with the "asleep" code. Reported for the same reason the cooldown fields are: so the client disables the button on the real rule rather than on a copy it keeps itself and discovers is wrong by being refused.

error

string

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.

  • minimum: 0

happiness

integer
itemsinteger

hunger

integer
itemsinteger

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.

  • minimum: 1

level

integer

Seconds until this pet can be petted again, or 0 if it can be now.

  • minimum: 0

wakesAt

integer

The GAME HOUR this pet wakes, absent when it is awake. ⚠ A GAME HOUR AND NOT A TIMESTAMP: a client wanting a countdown has dayLengthSeconds and can do the arithmetic, while an instant would be a second encoding of the same fact and the two could disagree.

  • minimum: 0
  • maximum: 23

Similar lexicons

semantic match

Lexicons whose schemas describe something close to this one. Check them before publishing a new one that overlaps.

  • The whole game in a handful of numbers, for /stats. Distinct from pet.trezy.getStats, which reports on ONE pet — this one never looks at an individual animal. Every figure is a plain aggregate over an indexed table, deliberately: the leaderboard pays three queries per pet to score a page, and a census that did the same would pay it for every pet in the game on every load.

  • The game's tunable numbers — caps, and the curves that decay a pet's care — published in the game's own repo (did:plc:ollch4g7tes2reb5eceiwuol) at rkey `self`. Only records from that DID are ever read — record.index:pet.trezy.gameConfig refuses the rest, and a forged config is worth more to an attacker than a forged tier because it raises every cap at once. These are records rather than constants because an upgrade system is coming: players will unlock higher caps as records in their OWN repo, s

  • Settle what happened in the terrarium while nobody was watching, and report the state feeding needs. Called on load. HappyView has no scheduler — the only job trigger is job.run:<type>, fired by jobs.create — so an absence is replayed here rather than ticked by a cron. The player cannot tell the difference: they close the tab with four morsels down and come back to find the pets fed and one morsel left. What they gain is that the gap is computed at the moment it can be REPORTED, and that resolut