# com.suibari.nagi.getCards

> Published by [suibari.com](https://lexicon.garden/identity/did:plc:uixgxpiqf4i63p6rgpu7ytmx)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:uixgxpiqf4i63p6rgpu7ytmx/com.suibari.nagi.getCards)
- [Documentation](https://lexicon.garden/lexicon/did:plc:uixgxpiqf4i63p6rgpu7ytmx/com.suibari.nagi.getCards/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:uixgxpiqf4i63p6rgpu7ytmx/com.suibari.nagi.getCards/examples)

## Definitions

### `com.suibari.nagi.getCards`

**Type**: `query`

指定ユーザーの全肯定カードコレクション。未所持のカードも定義だけ返す（コレクション表示のため）。所持状況は公開情報。自分自身を指定したときだけ drawStatus（本日引けるか）を含む。

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `actor` | `string` | Yes | 対象ユーザーの DID。 |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cards` | `array` | Yes | 全カード定義に所持情報（owned / comment / acquiredAt）を合成したもの。 |
| `drawStatus` | `unknown` | No | actor がビューア本人のときのみ。myNagi / reaction の各取得枠と nextDrawAt。旧クライアント互換の canDraw / todayCardId は通常枠を表す。 |
| `ownedCount` | `integer` | Yes |  |
| `totalCount` | `integer` | Yes |  |
| `anniversaryCards` | `array` | No | 所持している記念日カード（取得の古い順）。図鑑とは別枠で、ownedCount / totalCount には含めない。 |
| `pendingAnniversary` | `array` | No | actor がビューア本人のときのみ。本日が記念日で、まだ受け取っていないぶん。drawCard の source=anniversary で一括して受け取る。 |

#### Errors

- **InvalidRequest**

## Raw Schema

```json
{
  "id": "com.suibari.nagi.getCards",
  "defs": {
    "main": {
      "type": "query",
      "errors": [
        {
          "name": "InvalidRequest"
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "cards",
            "ownedCount",
            "totalCount"
          ],
          "properties": {
            "cards": {
              "type": "array",
              "items": {
                "type": "unknown"
              },
              "description": "全カード定義に所持情報（owned / comment / acquiredAt）を合成したもの。"
            },
            "drawStatus": {
              "type": "unknown",
              "description": "actor がビューア本人のときのみ。myNagi / reaction の各取得枠と nextDrawAt。旧クライアント互換の canDraw / todayCardId は通常枠を表す。"
            },
            "ownedCount": {
              "type": "integer"
            },
            "totalCount": {
              "type": "integer"
            },
            "anniversaryCards": {
              "type": "array",
              "items": {
                "type": "unknown"
              },
              "description": "所持している記念日カード（取得の古い順）。図鑑とは別枠で、ownedCount / totalCount には含めない。"
            },
            "pendingAnniversary": {
              "type": "array",
              "items": {
                "type": "unknown"
              },
              "description": "actor がビューア本人のときのみ。本日が記念日で、まだ受け取っていないぶん。drawCard の source=anniversary で一括して受け取る。"
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "required": [
          "actor"
        ],
        "properties": {
          "actor": {
            "type": "string",
            "description": "対象ユーザーの DID。"
          }
        }
      },
      "description": "指定ユーザーの全肯定カードコレクション。未所持のカードも定義だけ返す（コレクション表示のため）。所持状況は公開情報。自分自身を指定したときだけ drawStatus（本日引けるか）を含む。"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
