# pet.trezy.getNewPets

> Published by [trezy.pet](https://lexicon.garden/identity/did:plc:ollch4g7tes2reb5eceiwuol)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:ollch4g7tes2reb5eceiwuol/pet.trezy.getNewPets)
- [Documentation](https://lexicon.garden/lexicon/did:plc:ollch4g7tes2reb5eceiwuol/pet.trezy.getNewPets/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:ollch4g7tes2reb5eceiwuol/pet.trezy.getNewPets/examples)

## Definitions

### `pet.trezy.getNewPets`

**Type**: `query`

The pets adopted in the 7 days before asOf, for the weekly arrivals post. Live pets only: a pet retired inside the same week is not an arrival any more. ⚠ `total` IS THE TRUE COUNT AND `pets` IS ONLY WHAT FITS ON STAGE — the post's number must be how many animals arrived, not how many the renderer could draw. Carries no keeper DID and no pet name, because the post says neither — `#pet` carries `rkey` rather than the at-URI so the caller never even receives the keeper's DID, which sits in the URI's authority segment.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `asOf` | `string` (datetime) | Yes | The moment the week is measured back from. Never the clock, so a dry run and the real run agree. |
| `limit` | `integer` | No |  |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `pets` | `array` | Yes |  |
| `total` | `integer` | Yes | Every qualifying pet, including the ones beyond `limit`. |

### `pet.trezy.getNewPets#pet`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `createdAt` | `string` (datetime) | Yes |  |
| `rkey` | `string` | Yes | The pet's own record key, never the at-URI: the URI's authority segment is the keeper's DID, and this endpoint names no keeper. |
| `species` | `string` | Yes |  |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "The pets adopted in the 7 days before asOf, for the weekly arrivals post. Live pets only: a pet retired inside the same week is not an arrival any more. ⚠ `total` IS THE TRUE COUNT AND `pets` IS ONLY WHAT FITS ON STAGE — the post's number must be how many animals arrived, not how many the renderer could draw. Carries no keeper DID and no pet name, because the post says neither — `#pet` carries `rkey` rather than the at-URI so the caller never even receives the keeper's DID, which sits in the URI's authority segment.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "pets": {
              "items": {
                "ref": "#pet",
                "type": "ref"
              },
              "type": "array"
            },
            "total": {
              "description": "Every qualifying pet, including the ones beyond `limit`.",
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "pets",
            "total"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "asOf": {
            "description": "The moment the week is measured back from. Never the clock, so a dry run and the real run agree.",
            "format": "datetime",
            "type": "string"
          },
          "limit": {
            "default": 24,
            "maximum": 50,
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "asOf"
        ],
        "type": "params"
      },
      "type": "query"
    },
    "pet": {
      "properties": {
        "createdAt": {
          "format": "datetime",
          "type": "string"
        },
        "rkey": {
          "description": "The pet's own record key, never the at-URI: the URI's authority segment is the keeper's DID, and this endpoint names no keeper.",
          "type": "string"
        },
        "species": {
          "type": "string"
        }
      },
      "required": [
        "rkey",
        "species",
        "createdAt"
      ],
      "type": "object"
    }
  },
  "id": "pet.trezy.getNewPets",
  "lexicon": 1
}
```
