putMyTagBlock
屏蔽一个 tag
可选请求体 {mode}:tree(缺省)或 exact。已屏蔽的 tag 只更新其 mode,不另写入。未知 tag 为 404。最多屏蔽 100 个 tag。需要用户访问令牌。任何应用都可调用,不需要 scope。
put
/v2/me/blocked-tags/{tag_id}Authorization: Bearer <用户访问令牌>(用户授权后的访问令牌,不是 API 密钥)参数
| 参数 | 类型 | 位置 | 说明 |
|---|---|---|---|
tag_id 必填 | string | path | catalog tag id。 |
请求体
application/json
modestringtree(缺省)连同 tag 层级中其下的所有 tag 一并屏蔽;exact 只屏蔽这一个 tag。
枚举treeexact
响应
created_atstringdate-time 必填持令牌用户屏蔽该 tag 的时间。
modestring必填tree:把 id 放进 exclude_tag_tree,其下所有 tag 的作品也一并剔除。exact:放进 exclude_tag_id。
枚举treeexactobjectstring必填类型判别字段,恒为 tag_block。
枚举tag_blocktag_idstring必填catalog tag id。
updated_atstringdate-time 必填mode 最近一次改动的时间。改动前与 created_at 相同。
请求示例
cURL
curl -X PUT "https://api.nextmoe.dev/v2/me/blocked-tags/1" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{"mode":"tree"}'