How can I specify ALL guids for getNoteWithResultSpec()?

笑着哭i 提交于 2019-12-11 16:39:20

问题


New to evernote api using Ruby. Using the example to try to get a list of notes from notebooks. That example seems pretty messed up though so I don't think I'm properly configured. I'm stuck on what to put to include content from this page, http://dev.evernote.com/doc/reference/NoteStore.html#Fn_NoteStore_getNoteWithResultSpec

def note_store @note_store ||= client.note_store end

note_store.getNoteWtihResultSpec(auth_token, true)


回答1:


NoteStore.getNoteWithResultSpec is meant to retrieve one specific note. If you need to find all notes belonging to a certain notebook, use NoteStore.findNotesMetadata to find notes. In passed NoteFilter structure you need to provide the guid of your notebook.

Note that this means you will need to do as many NoteStore.getNoteWithResultSpec calls as the number of notes you have. A more elegant solution would be to synchronize your notebook: use NoteStore.getFilteredSyncChunk repeatedly to get note data in chunks. In SyncChunkFilter structure specify the list of notebook guids you're interested in (which can be just one).

Also, if your goal is to keep up with the changes in that notebook, instead of periodically polling for new data with NoteStore.getFilteredSyncChunk, you can request a setup of a webhook to get notified of changes.



来源:https://stackoverflow.com/questions/48775651/how-can-i-specify-all-guids-for-getnotewithresultspec

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!