如何列出Evernote商务笔记本中的所有笔记

时间:2016-03-14 15:12:07

标签: ruby evernote

使用https://github.com/evernote/evernote-oauth-ruby,如何列出商务笔记本中的所有笔记?

我能够通过

获得所有商务笔记本
business_note_store.listNotebooks

但是,使用

列出上述声明中business_notebook_id来自的所有注释
business_note_store.findNotesMetadata(
  @client.access_token.token,
  filter(business_notebook_id), 0, 200, specs
).notes

在我使用时导致异常:

def filter(notebook_id)
  filter = Evernote::EDAM::NoteStore::NoteFilter.new
  filter.order = Evernote::EDAM::Type::NoteSortOrder::UPDATED
  filter.notebookGuid = notebook_id

  filter
end

def spec
  spec = Evernote::EDAM::NoteStore::NotesMetadataResultSpec.new
  spec.includeTitle = true
  spec.includeUpdated = true

  spec
end

1 个答案:

答案 0 :(得分:0)

当我删除令牌

时,它有效
business_note_store.findNotesMetadata(
  filter(business_notebook_id), 0, 200, specs
).notes

工作正常。现在我只想知道原因:)