patchMyNewsItem
编辑或撤回我的一条资讯
处于 pending 时,可编辑 title/summary/source_url/banner_hash/work_ids 并把条目送回机器打分。一旦 published,唯一合法迁移是带 If-Match 的 {"status":"withdrawn"}。rejected 为终态。
patch
/v2/me/news/{id}Authorization: Bearer <用户访问令牌>(用户授权后的访问令牌,不是 API 密钥)参数
| 参数 | 类型 | 位置 | 说明 |
|---|---|---|---|
id 必填 | string | path | 资讯条目 id。 |
If-Match | string | header | 当前 ETag。撤回时必填。 |
请求体
application/json
banner_hashstring图床内容哈希。空字符串清除横幅。
source_urlstringuri指向原始条目的规范链接。
statusstring仅 withdrawn。发布与驳回在审核队列进行,从不在此面。
枚举withdrawnsummarystring最多 200 个 rune;更长则返回 422 VALIDATION_FAILED,reason 为 TOO_LONG。不得用作判别条件。
titlestring不得用作判别条件。
work_idsstring[]整份关联作品集合整表替换。
响应
banner_hashstring必填横幅的图床内容哈希。没有时为空字符串。
idstring必填资讯条目 id。与 /v2/news 同一 id 空间。
lanestring必填该条目属于来源的两个分区中的哪一个。
枚举newscolumnobjectstring必填类型判别字段。恒为 news_submission。
枚举news_submissionpublished_atstringdate-time 必填RFC 3339 UTC。
sourceobject必填display_namestring必填不得用作判别条件。
namestring必填来源键。
objectstring必填类型判别字段。恒为 news_source。
枚举news_source
source_urlstringuri 必填指向原始条目的规范链接。
statusstring必填审核生命周期状态。POST 总是落到 pending。
枚举pendingpublishedrejectedwithdrawnsummarystring必填导语,最多 200 个 rune。不得用作判别条件。
titlestring必填不得用作判别条件。
work_idsstring[]必填手工关联的作品 id。空数组,从不为 null。
请求示例
cURL
curl -X PATCH "https://api.nextmoe.dev/v2/me/news/value" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{}'