patchMyProposal
修改或撤回提案
需要 If-Match。需要用户访问令牌。
patch
/v2/me/proposals/{id}Authorization: Bearer <用户访问令牌>(用户授权后的访问令牌,不是 API 密钥)参数
| 参数 | 类型 | 位置 | 说明 |
|---|---|---|---|
id 必填 | string | path | 提案 id。 |
If-Match 必填 | string | header | 当前 ETag。必填;缺席为 428 PRECONDITION_REQUIRED。 |
请求体
application/json
patchmap<string, object>字段键到要修订的新值。
«key»object
statestring设为 withdrawn 以撤回。
枚举withdrawn
响应
amendmentsobject[]仅当 include=amendments 时出现。没有则为空数组。
amender_uidstring必填认领站自己的修正者用户 id。不是 catalog id。
created_atstringdate-time 必填RFC 3339 UTC。
idstring必填修订 id。
notestring必填修订者自己的摘要。不得用作判别条件。
objectstring必填类型判别字段。恒为 amendment。
枚举amendmentseqintegerint64 必填在此提案 amendment 链中的位置。
base_revision_seqintegerint64 必填本提案写就时所对照的修订 seq。
created_atstringdate-time 必填RFC 3339 UTC。
decided_atstringdate-time 必填 可空RFC 3339 UTC。仍开放时为 null。
decided_by_uidstring必填 可空认领站自己的裁决者用户 id。仍开放时为 null。
effective_patchmap<string, object>仅当 include=patch 时出现。把每条修正都折叠进去之后的 patch;这是合入时会写入的内容。
«key»object
entity_idstring必填目标 catalog id。
entity_typestring必填编辑引擎类型,例如 catalog.work。不得用作判别条件。
idstring必填提案 id。
notestring必填提案人自己写的摘要。不得用作判别条件。
objectstring必填类型判别字段。恒为 proposal。
枚举proposalpatchmap<string, object>仅当 include=patch 时出现;该块只由 me 面与 moderation 面下发。字段键到拟议值。
«key»object
proposer_uidstring必填认领站自己的提案者用户 id。不是 catalog id。
sitestring必填本提案提交时所在的租户。开放词表;不得用作判别条件。
statestring必填提案生命周期状态。
枚举openmergeddeclinedwithdrawntarget_objectstring必填本提案所针对实体的族。
枚举workcompanycharacterreleasetagengineseriesupdated_atstringdate-time 必填RFC 3339 UTC。
请求示例
cURL
curl -X PATCH "https://api.nextmoe.dev/v2/me/proposals/value" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{}'