记录判定
await mn.api('/notes/' + noteid + '/practice-verdict', {
method: 'POST',
body: {
commentId, expectedRevision: rev,
practice: { topic: topicid },
self: 'again', reason: 'careless',
confirm: true
}
});{
"persisted": true,
"noteid": "B9F3696A-AF8A-43B2-A8A2-2791717F1695",
"commentId": "1F4C2A90-6C2B-4E1F-9F3A-2B7C1D5E8A44",
"practice": {
"addon": "mn.cardpractice",
"topic": "77012CA0-48E8-4D29-B5F5-1EEA927AE086",
"card": "B9F3696A-AF8A-43B2-A8A2-2791717F1695",
"self": "again",
"reason": "careless",
"reasonLabel": "粗心",
"at": 1791273090
},
"hashtags": [
"#practice/question",
"#practice/again",
"#practice/error/careless"
],
"tagsChanged": true,
"commentsRevision": "4",
"bridgeApiVersion": "0.91"
}卡片与摘录
提交作答判定
把本次作答的判定写下来:是否掌握,以及错因。
要带 expectedRevision,与打开作答纸时用的是同一个版本号。
出现下列情形时判定不会写下:
PRACTICE_CONFIG_UNAVAILABLE:当前场景没有给该插件声明标签前缀与错因清单。该项配置取自GET /immersive/template的plugins[].config。PRACTICE_TOPIC_CHANGED:这道题不属于当前学习集。须刷新重读后重新提交,原地重试得到同样的结果。PRACTICE_KEY_INVALID:身份无法写出。
后两者发生在写入之前,没有任何改动生效。
POST
/
notes
/
{noteid}
/
practice-verdict
记录判定
await mn.api('/notes/' + noteid + '/practice-verdict', {
method: 'POST',
body: {
commentId, expectedRevision: rev,
practice: { topic: topicid },
self: 'again', reason: 'careless',
confirm: true
}
});{
"persisted": true,
"noteid": "B9F3696A-AF8A-43B2-A8A2-2791717F1695",
"commentId": "1F4C2A90-6C2B-4E1F-9F3A-2B7C1D5E8A44",
"practice": {
"addon": "mn.cardpractice",
"topic": "77012CA0-48E8-4D29-B5F5-1EEA927AE086",
"card": "B9F3696A-AF8A-43B2-A8A2-2791717F1695",
"self": "again",
"reason": "careless",
"reasonLabel": "粗心",
"at": 1791273090
},
"hashtags": [
"#practice/question",
"#practice/again",
"#practice/error/careless"
],
"tagsChanged": true,
"commentsRevision": "4",
"bridgeApiVersion": "0.91"
}路径参数
卡片的 noteid。取自卡片命令响应的 noteid、POST /notes/batch-get 响应里 items[].noteid,或 GET /ui-state 的 state.focusnoteid。
请求体
application/json