patchMyClaim
转移调用方拥有的认领
PATCH {state: live|pending|withdrawn}。live 不经审核发布草稿,pending 提交审核,withdrawn 退回草稿。所有者可操作;无主认领由首位认领人收养。需要 If-Match。需要绑定到 catalog 站点的用户访问令牌。
patch
/v2/me/claims/{id}Authorization: Bearer <用户访问令牌>(用户授权后的访问令牌,不是 API 密钥)参数
| 参数 | 类型 | 位置 | 说明 |
|---|---|---|---|
id 必填 | string | path | 作品 id。 |
If-Match 必填 | string | header | 当前 ETag。必填;缺席为 428 PRECONDITION_REQUIRED。 |
请求体
application/json
statestring必填live 发布草稿,pending 提交审核,withdrawn 把 live 或 pending 认领退回草稿。draft 是 withdrawn 的旧拼写。
枚举livependingwithdrawndraft
响应
acted_countintegerint64持令牌者对本作品的操作次数;给出 site= 时限定在该范围内。出现在 me 面上。
display_namestring必填不得用作判别条件。
first_acted_atstringdate-timeRFC 3339 UTC,持有者在本作品上的第一次操作时间。仅在 me 面出现。
idstring必填本认领所属的作品 id。
last_eventobjectactor_uidstring必填认领站自己的 actor 用户 id——裁决事件上是审核员,不一定是认领所有者。
created_atstringdate-time 必填RFC 3339 UTC。
from_statestring必填 可空事件之前的状态。创建认领的那条事件上为 null。
枚举nonelivedraftpendingdeclinedhiddenidstring必填认领事件 id。与 /v2/catalog/claim-events 同一 id 空间。
objectstring必填类型判别字段。恒为 claim_event。
枚举claim_eventreasonstring必填 可空操作者备注,通常为拒绝原因。未填写时为 null。不得用作判别条件。
to_statestring必填事件之后的状态。
枚举nonelivedraftpendingdeclinedhidden
objectstring必填类型判别字段。恒为 claim。
枚举claimproduct_work_idstring必填 可空认领站自己的作品 id。未认领时为 null。
sitestring必填认领站点 key,未认领时为空。开放词表;不得用作判别条件。
statestring必填认领生命周期状态。none 表示该作品当前未被任何站点认领。
枚举nonelivedraftpendingdeclinedhidden
请求示例
cURL
curl -X PATCH "https://api.nextmoe.dev/v2/me/claims/value" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{"state":"live"}'