getCatalogCompanyGraph
公司家族图
围绕一家公司的企业家族节点与有向边。不发出反向关系。include= 按公司 token 集校验,因此 aliases、intros 与 links 会被接受,但响应中不带这些块;只有 include=logo 会改变节点,给有品牌标识的节点加上品牌标识。已合并的 id 返回 404 ENTITY_MERGED。需要应用密钥。
get
/v2/catalog/companies/{id}/graph scope
catalog:readAuthorization: Bearer nmk_live_…(v2 应用密钥,门户自助铸造,无需申请)参数
| 参数 | 类型 | 位置 | 说明 |
|---|---|---|---|
id 必填 | string | path | 十进制 catalog id。 |
nsfw | string | query | true 包含 r18。false 或缺省则隐藏 r18。仅 true 或 false。 |
view | string | query | basic(默认)或 full。封闭词表。 |
include | string | query | 逗号分隔的块。未知 token 返回 400 UNKNOWN_INCLUDE。 |
fields | string | query | 逗号分隔的顶层键。未知 token 返回 400 UNKNOWN_FIELD。object 与 id 始终保留。 |
响应
edgesobject[]必填节点间的有向关系。空数组,从不为 null。不发出反向关系。
from_idstring必填源公司 id。to_id 是 from_id 的具名关系。
relationstring必填to_id 是 from_id 的该 relation。不发出反向边。
枚举parentimprintspawnedsucceeded_byto_idstring必填目标公司 id。
nodesobject[]必填本家族中的公司。空数组,从不为 null。
display_namestring必填不得用作判别条件。
idstring必填catalog 公司 id。
localizedmap<string, object>必填BCP-47 键。没有则为空对象。不得用作判别条件。
logoobjectobjectstring必填类型判别字段。恒为 company。
枚举companywork_countintegerint64 必填同一 NSFW 闸下可见的作品。
objectstring必填类型判别字段。恒为 company_graph。
枚举company_graphtruncatedboolean必填遍历以所请求公司为起点,上限 60 个节点、4 跳。true 表示族谱在 nodes[] 所载之外仍有延续,此为部分图;false 表示 nodes[] 即完整连通族。
请求示例
cURL
curl "https://api.nextmoe.dev/v2/catalog/companies/value/graph" \
-H "Authorization: Bearer nmk_live_<YOUR_KEY>"