Skip to content

卡组字段

卡组响应

字段类型说明
idUUID卡组主键
namestring由攻略字段组合出的展示名称
descriptionstring | null卡组介绍
main_factionstring主阵营
ally_factionstring | null盟军阵营
deck_codestring标准 KARDS 卡组代码
cards_snapshot{card_id,count}[]服务端从代码解析的卡牌快照
tagsstring[]最多 12 个,每个最多 20 字符
share_slugstring | null公开详情路径使用的分享标识
displayobject展示卡与卡背设置
guideobject | null卡组攻略;备卡位于其中
archiveobject图表和档案设置
authorobject公开作者资料,存在时返回
created_at / updated_atdate-time | null创建和更新时间

自己的卡组接口还返回 visibilitysort_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_idcard_back_id 放在请求正文顶层。展示卡必须属于当前卡组;卡背必须来自卡背目录并通过可用性与阵营校验。

visibility

行为
public出现在公开列表,也可通过分享标识读取
unlisted不出现在公开列表,知道分享标识即可读取
private只允许所有者通过 API Key 读取