1
0
card/docs/API.md
2025-06-01 21:39:53 +09:00

1.6 KiB

ai.card API Documentation

Base URL

http://localhost:8000/api/v1

Endpoints

Draw Card

カードを抽選します。

POST /cards/draw

Request Body

{
  "user_did": "did:plc:example123",
  "is_paid": false
}

Response

{
  "card": {
    "id": 0,
    "cp": 88,
    "status": "normal",
    "skill": null,
    "owner_did": "did:plc:example123",
    "obtained_at": "2025-01-01T00:00:00",
    "is_unique": false,
    "unique_id": null
  },
  "is_new": true,
  "animation_type": "normal"
}

Get User Cards

ユーザーの所有カード一覧を取得します。

GET /cards/user/{user_did}

Response

[
  {
    "id": 0,
    "cp": 88,
    "status": "normal",
    "skill": null,
    "owner_did": "did:plc:example123",
    "obtained_at": "2025-01-01T00:00:00",
    "is_unique": false,
    "unique_id": null
  }
]

Get Unique Cards

全てのuniqueカード一覧を取得します。

GET /cards/unique

Response

[
  {
    "id": 8,
    "cp": 500,
    "status": "unique",
    "skill": "skill_8_unique",
    "owner_did": "did:plc:example123",
    "obtained_at": "2025-01-01T00:00:00",
    "is_unique": true,
    "unique_id": "550e8400-e29b-41d4-a716-446655440000"
  }
]

Card Rarity

  • normal: 通常カード (99.789%)
  • rare: レアカード (0.1%)
  • super_rare: スーパーレアカード (0.01%)
  • kira: キラカード (0.1%)
  • unique: ユニークカード (0.0001%)

Animation Types

  • normal: 通常演出
  • rare: レア演出
  • kira: キラカード演出
  • unique: ユニークカード演出(特別演出)