我可以在一个笔记本中获得一次搜索:
var token = 'xxxxXXX';
const Evernote = require('evernote');
const nFilter = new Evernote.NoteStore.NoteFilter({
words: 'somesearch notebook:"notebook 1"',
ascending: false
});
const rSpec = {};
rSpec.includeTitle = true;
var client = new Evernote.Client({token: token, sandbox: false});
var noteStore = client.getNoteStore();
noteStore.findNotesMetadata(nFilter, 0, 50, rSpec).then(function(notesMetadataList) {
console.log("Found " + notesMetadataList.notes.length + " notes.");
console.log();
console.log("Here are their titles: ");
var titles = [];
for (var i =0;i<notesMetadataList.notes.length;i++) {
titles[i]=notesMetadataList.notes[i].title;
console.log(titles[i]);
}
}).catch(function(err){
console.log('Error:',err);
});
但我无法弄清楚如何在“笔记本2”上进行第二次搜索,并将其标题附加到变量titles
...顺便说一下,我是node.js编程的新手。
此致
答案 0 :(得分:1)
免责声明:未经测试
简短回答是您需要迭代笔记本,然后在报告之前总结结果。我编辑了你的代码,留下了一些指针注释。
column01: 1254 0 40 1 1 0 0
column02: -9 2 140 0 289 -9 -9 -9
column03: 0 -9 -9 0 12 16 84 0
column04: 0 0 0 0 150 18 -9 7
column05: 172 86 200 110 140 86 0 0
column06: 0 -9 26 20 -9 -9 -9 -9
column07: -9 -9 -9 -9 -9 -9 -9 12
column08: 20 84 0 -9 -9 -9 -9 -9
column09: -9 -9 -9 -9 -9 1 1 1
column10: 1 1 -9. -9. name