# com.suibari.nagi.donateCards

> カードをおすそわけボードに置き、Ƶ を受け取る。手元に3枚を残し、ゼンカツでお休み中の在庫には手を付けない。mode=all は置けるぶんをすべて置く。置いたカードは取り下げられない。要認証。

- Kind: procedure
- Authority: nagi.suibari.com
- Lexicon: 1
- Published by [suibari.com](https://lexicon.garden/identity/did:plc:uixgxpiqf4i63p6rgpu7ytmx), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:uixgxpiqf4i63p6rgpu7ytmx/com.suibari.nagi.donateCards)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:uixgxpiqf4i63p6rgpu7ytmx/com.suibari.nagi.donateCards/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:uixgxpiqf4i63p6rgpu7ytmx/com.suibari.nagi.donateCards/analytics)

## Procedure (`com.suibari.nagi.donateCards`)

Type: procedure · POST

### Input (application/json)

- `card` (unknown): mode=single のとき必須。{ volume, id }。
- `mode` (string, required)
  - Constraints: knownValues: all | single
- `quantity` (integer): mode=single の枚数。省略時は1。置ける枚数を超えたらエラー。
  - Constraints: minimum: 1

### Output (application/json)

- `balance` (integer, required)
- `donated` (array, required): 置いたカードごとの { volume, id, rarity, quantity, zenny }。図鑑順。演出の並びに使う。
  - `items` (unknown)
- `earned` (integer, required)

### Errors

- `AuthRequired`: No description in schema.
- `not_donatable`: No description in schema.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "カードをおすそわけボードに置き、Ƶ を受け取る。手元に3枚を残し、ゼンカツでお休み中の在庫には手を付けない。mode=all は置けるぶんをすべて置く。置いたカードは取り下げられない。要認証。",
      "errors": [
        {
          "name": "AuthRequired"
        },
        {
          "name": "not_donatable"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "card": {
              "description": "mode=single のとき必須。{ volume, id }。",
              "type": "unknown"
            },
            "mode": {
              "knownValues": [
                "all",
                "single"
              ],
              "type": "string"
            },
            "quantity": {
              "description": "mode=single の枚数。省略時は1。置ける枚数を超えたらエラー。",
              "minimum": 1,
              "type": "integer"
            }
          },
          "required": [
            "mode"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "balance": {
              "type": "integer"
            },
            "donated": {
              "description": "置いたカードごとの { volume, id, rarity, quantity, zenny }。図鑑順。演出の並びに使う。",
              "items": {
                "type": "unknown"
              },
              "type": "array"
            },
            "earned": {
              "type": "integer"
            }
          },
          "required": [
            "donated",
            "earned",
            "balance"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "com.suibari.nagi.donateCards",
  "lexicon": 1
}
```
