卡组字段
卡组响应
| 字段 | 类型 | 说明 |
|---|---|---|
id | UUID | 卡组主键 |
name | string | 由攻略字段组合出的展示名称 |
description | string | null | 卡组介绍 |
main_faction | string | 主阵营 |
ally_faction | string | null | 盟军阵营 |
deck_code | string | 标准 KARDS 卡组代码 |
cards_snapshot | {card_id,count}[] | 服务端从代码解析的卡牌快照 |
tags | string[] | 最多 12 个,每个最多 20 字符 |
share_slug | string | null | 公开详情路径使用的分享标识 |
display | object | 展示卡与卡背设置 |
guide | object | null | 卡组攻略;备卡位于其中 |
archive | object | 图表和档案设置 |
author | object | 公开作者资料,存在时返回 |
created_at / updated_at | date-time | null | 创建和更新时间 |
自己的卡组接口还返回 visibility 与 sort_order;公开接口不会返回这两个管理字段。
guide
| 字段 | 限制 | 说明 |
|---|---|---|
schema_version | 只读,固定为 1 | 攻略结构版本 |
prefix | 最多 24 字符 | 名称前缀 |
system | 必填,最多 40 字符 | 卡组体系 |
variant | 最多 40 字符 | 分支或版本 |
description | 最多 1200 字符 | 卡组介绍;写入后只从响应顶层 description 返回 |
core_cards | 最多 30 个唯一 ID | 必须属于主卡组且不能是衍生卡 |
reserve_recommendations | 最多 30 个唯一 ID | 备卡;不必属于主卡组,但不能是衍生卡 |
substitutions | 最多 20 项 | 标准卡与替换卡的对应关系 |
otk_components | 最多 10 组 | 每组 1 至 10 个主卡组内卡牌 ID |
guide 在 PATCH 中是整对象替换,详见调用备卡。
display
响应把两个输入字段归入 display:
json
{
"display": {
"featured_card_id": "<card_id>",
"card_back_id": "<card_back_id>"
}
}写入时仍应把 featured_card_id 与 card_back_id 放在请求正文顶层。展示卡必须属于当前卡组;卡背必须来自卡背目录并通过可用性与阵营校验。
visibility
| 值 | 行为 |
|---|---|
public | 出现在公开列表,也可通过分享标识读取 |
unlisted | 不出现在公开列表,知道分享标识即可读取 |
private | 只允许所有者通过 API Key 读取 |