patchMyNewsItem
编辑或撤回我的一条资讯
pending 或 published 的条目都可以编辑(title/summary/body/source_url/banner_hash/work_ids)。pending 的编辑会重新打分;published 的编辑会让条目从列表下线、回到 pending,直到审核员再次发布,来源受信任时除外。published 的条目可以带 If-Match 用 {"status":"withdrawn"} 撤回。rejected 与 withdrawn 为终态。
/v2/me/news/{id}Authorization: Bearer <用户访问令牌>(用户授权后的访问令牌,不是 API 密钥)参数
| 参数 | 类型 | 位置 | 说明 |
|---|---|---|---|
id 必填 | string | path | 资讯条目 id。 |
If-Match | string | header | 当前 ETag。撤回时必填。 |
请求体
application/json
banner_hashstring横幅的哈希,取自 POST /v2/me/news-images 的返回值;不是由该接口存入的哈希会被拒为 422 VALIDATION_FAILED,reason 为 UNKNOWN_REFERENCE。空字符串清除横幅。
bodystring最多 20000 个 rune。只有社区投稿可以携带;空字符串表示清空。不得用作判别条件。
source_urlstring指向原始条目的规范链接,须为绝对 http(s) URL。空字符串表示清空,只有社区投稿可以这样做。不得用作判别条件。
statusstring仅 withdrawn。发布与驳回在审核队列进行,从不在此面。
枚举withdrawnsummarystring最多 200 个 rune;更长则返回 422 VALIDATION_FAILED,reason 为 TOO_LONG。不得用作判别条件。
titlestring不得用作判别条件。
work_idsstring[]整份关联作品集合整表替换。
响应
bannerobject必填 可空头图。没有时为 null。B10:永远不是裸 hash。
hashstring必填图床内容哈希。
heightintegerint64 必填 可空像素高度。未知则为 null。
sexualstring必填 可空性描写。null 表示未评估。
枚举safesuggestiveexplicitsourcestring必填开放词表来源。不得用作判别条件。
thumbhashstring必填 可空Thumbhash。未知则为 null。
urlstringuri 必填图片的绝对 URL。从不为裸 hash。
violencestring必填 可空暴力描写。null 表示未评估。目前没有任何 catalog 行经过评估;该值恒为 null。
枚举tameviolentbrutalwidthintegerint64 必填 可空像素宽度。未知则为 null。
bodystring必填条目自己的正文,CommonMark Markdown。只有社区投稿才带;其余为空字符串。不得用作判别条件。
idstring必填资讯条目 id。与 /v2/news 同一 id 空间。
lanestring必填该条目属于来源的两个分区中的哪一个。
枚举newscolumnobjectstring必填类型判别字段。恒为 news_submission。
枚举news_submissionpublished_atstringdate-time 必填RFC 3339 UTC。
sourceobject必填attributionstring必填转载说明,授权方自己写的原文。请随条目一同展示,不要自行拼写。不可用作判别依据。
column_urlstringuri 必填该源的专栏索引。源没有专栏时为空串。
display_namestring必填不得用作判别条件。
homepage_urlstringuri 必填来源自己的站点主页。该来源没有时为空字符串。
namestring必填来源键。
objectstring必填类型判别字段。恒为 news_source。
枚举news_source
source_urlstringuri 必填指向原始条目的规范链接。原创社区投稿为空字符串。
statusstring必填审核生命周期状态。POST 总是落到 pending。
枚举pendingpublishedrejectedwithdrawnsubmitter_uidstring必填 可空投稿该条目的账号:NextMoe 各站共用的中央登录用户 id。合作方来源导入的条目为 null。
summarystring必填导语,最多 200 个 rune。不得用作判别条件。
titlestring必填不得用作判别条件。
work_idsstring[]必填手工关联的作品 id。空数组,从不为 null。
请求示例
curl -X PATCH "https://api.nextmoe.dev/v2/me/news/1" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{"title":"中文版发售日确定"}'