# com.suibari.nagi.takeBoardCard

> おすそわけボードから、まだ持っていないカードを1枚、Ƶ を払って受け取る。早い者勝ち。AAR はボードに無ければ botたんの分を受け取る。提供者は枚数で重み付けしたランダムで選ばれ、カードに「〜からもらった」が付く。要認証。

- 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.takeBoardCard)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:uixgxpiqf4i63p6rgpu7ytmx/com.suibari.nagi.takeBoardCard/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:uixgxpiqf4i63p6rgpu7ytmx/com.suibari.nagi.takeBoardCard/analytics)

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

Type: procedure · POST

### Input (application/json)

- `card` (unknown, required): { volume, id }
- `price` (integer, required): 画面に出ていた額。これより高くなっていたら out_of_stock（AAR がボードから消えて botたんの額になった）。
  - Constraints: minimum: 1

### Output (application/json)

- `balance` (integer, required)
- `card` (unknown, required): 受け取ったカードの CardView。receivedFrom が付く。コメントは非同期生成。
- `paid` (integer, required)

### Errors

- `AuthRequired`: No description in schema.
- `already_owned`: No description in schema.
- `out_of_stock`: No description in schema.
- `insufficient_zenny`: No description in schema.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "おすそわけボードから、まだ持っていないカードを1枚、Ƶ を払って受け取る。早い者勝ち。AAR はボードに無ければ botたんの分を受け取る。提供者は枚数で重み付けしたランダムで選ばれ、カードに「〜からもらった」が付く。要認証。",
      "errors": [
        {
          "name": "AuthRequired"
        },
        {
          "name": "already_owned"
        },
        {
          "name": "out_of_stock"
        },
        {
          "name": "insufficient_zenny"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "card": {
              "description": "{ volume, id }",
              "type": "unknown"
            },
            "price": {
              "description": "画面に出ていた額。これより高くなっていたら out_of_stock（AAR がボードから消えて botたんの額になった）。",
              "minimum": 1,
              "type": "integer"
            }
          },
          "required": [
            "card",
            "price"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "balance": {
              "type": "integer"
            },
            "card": {
              "description": "受け取ったカードの CardView。receivedFrom が付く。コメントは非同期生成。",
              "type": "unknown"
            },
            "paid": {
              "type": "integer"
            }
          },
          "required": [
            "card",
            "paid",
            "balance"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "com.suibari.nagi.takeBoardCard",
  "lexicon": 1
}
```
