记录一个状态字段
await mn.api('/notes/addon-values', {
method: 'POST',
// addon 由 MarginNote 设为本面板的 owner,此处填写不生效
body: { noteIds: [noteid], values: { status: 'done' }, confirm: true }
});{
"persisted": true
}卡片与摘录
更新卡片插件字段
把插件自己的数据写到卡片上,单次上限为 200 张卡与 50 个键。值写 null 表示删掉该键。
面板会把 addon 改写为本面板所属插件的 owner,页面填的值不会生效,因此写不到别的
插件名下。confirm 由 MarginNote 补上。
响应里的 persisted 是独立重新读取、核对一致之后才返回的,据此判断写入是否成功。批量写入不经过
提交,需要在同一步里改动多项时用 POST /notes/{noteid}/edits。
POST
/
notes
/
addon-values
记录一个状态字段
await mn.api('/notes/addon-values', {
method: 'POST',
// addon 由 MarginNote 设为本面板的 owner,此处填写不生效
body: { noteIds: [noteid], values: { status: 'done' }, confirm: true }
});{
"persisted": true
}请求体
application/json