# ai.card API Documentation ## Base URL ``` http://localhost:8000/api/v1 ``` ## Endpoints ### Draw Card カードを抽選します。 ``` POST /cards/draw ``` #### Request Body ```json { "user_did": "did:plc:example123", "is_paid": false } ``` #### Response ```json { "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 ```json [ { "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 ```json [ { "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`: ユニークカード演出(特別演出)