获取批注与版本号
const r = await mn.api('/notes/' + noteid + '/comments');
const ticket = r.revision; // 改写与删除要用的版本号
mn.log(r.comments.map(c => c.index + ': ' + c.text).join('\n'));{
"revision": "3",
"comments": [
{
"index": 1,
"ownerNoteId": "B9F3696A-AF8A-43B2-A8A2-2791717F1695",
"commentId": "1F4C2A90-6C2B-4E1F-9F3A-2B7C1D5E8A44",
"collapsed": false,
"type": "practice",
"text": ""
}
],
"cardAnnotation": true,
"annotationVersion": 1
}卡片与摘录
列出卡片批注
返回该卡的全部批注,包含作答纸类,同时返回当前版本号。更新与删除批注都要携带该版本号。
序号从 1 开始。不含文字的条目同样占用序号。较早的条目上 commentId 可能为 null。
GET
/
notes
/
{noteid}
/
comments
获取批注与版本号
const r = await mn.api('/notes/' + noteid + '/comments');
const ticket = r.revision; // 改写与删除要用的版本号
mn.log(r.comments.map(c => c.index + ': ' + c.text).join('\n'));{
"revision": "3",
"comments": [
{
"index": 1,
"ownerNoteId": "B9F3696A-AF8A-43B2-A8A2-2791717F1695",
"commentId": "1F4C2A90-6C2B-4E1F-9F3A-2B7C1D5E8A44",
"collapsed": false,
"type": "practice",
"text": ""
}
],
"cardAnnotation": true,
"annotationVersion": 1
}路径参数
卡片的 noteid。取自卡片命令响应的 noteid、POST /notes/batch-get 响应里 items[].noteid,或 GET /ui-state 的 state.focusnoteid。