pet.trezy.dropFood

trezy.pet

Documentation

Put one morsel on the ground. Writes to the caller's terrarium space; the space is created lazily by the first drop, so a player who never feeds anything never gets one.

main procedure

Put one morsel on the ground. Writes to the caller's terrarium space; the space is created lazily by the first drop, so a player who never feeds anything never gets one.

Input

Encodingapplication/json
food string Required

The id of a published pet.trezy.food.

x integer Required

Horizontal position in scaled world px.

Output

Encodingapplication/json
droppedAt stringdatetime Optional

An RFC 3339 formatted timestamp.

error string Optional

Present instead of rkey/droppedAt when the drop was refused for an expected reason. A stable machine code the client branches on — add codes, never rename them.

Known values: not-authenticated, unknown-food, bad-position, terrarium-full, save-failed
message string Optional

A sentence to show the player, accompanying `error`. Free to reword; do not branch on it.

rkey string Optional

The morsel's key in the space. What the client passes back as createInteraction's `drop` when a pet eats it.

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
{
  "description": "Put one morsel on the ground. Writes to the caller's terrarium space; the space is created lazily by the first drop, so a player who never feeds anything never gets one.",
  "input": {
    "encoding": "application/json",
    "schema": {
      "properties": {
        "food": {
          "description": "The id of a published pet.trezy.food.",
          "type": "string"
        },
        "x": {
          "description": "Horizontal position in scaled world px.",
          "type": "integer"
        }
      },
      "required": [
        "food",
        "x"
      ],
      "type": "object"
    }
  },
  "output": {
    "encoding": "application/json",
    "schema": {
      "properties": {
        "droppedAt": {
          "format": "datetime",
          "type": "string"
        },
        "error": {
          "description": "Present instead of rkey/droppedAt when the drop was refused for an expected reason. A stable machine code the client branches on — add codes, never rename them.",
          "knownValues": [
            "not-authenticated",
            "unknown-food",
            "bad-position",
            "terrarium-full",
            "save-failed"
          ],
          "type": "string"
        },
        "message": {
          "description": "A sentence to show the player, accompanying `error`. Free to reword; do not branch on it.",
          "type": "string"
        },
        "rkey": {
          "description": "The morsel's key in the space. What the client passes back as createInteraction's `drop` when a pet eats it.",
          "type": "string"
        }
      },
      "required": [],
      "type": "object"
    }
  },
  "type": "procedure"
}

Lexicon Garden

@