13
14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

PythonでEvernoteのノートを取得

Posted at

EvernoteのAPIを調べてるうちに、ノートを作成する記事はあるのですが、既存のノート一覧を取得するものは少ないなーと思ってメモ。

リファレンス
https://dev.evernote.com/doc/reference/

import evernote.edam.notestore.ttypes as NoteStore
from evernote.api.client import EvernoteClient

auth_token = "your token"
client = EvernoteClient(token=auth_token)
note_store = client.get_note_store()

note_filter = NoteStore.NoteFilter()
note_filter.words = ''  # 好きなキーワードをどうぞ
notes_metadata_result_spec = NoteStore.NotesMetadataResultSpec()

notes_metadata_list = note_store.findNotesMetadata(note_filter, 0, 100, notes_metadata_result_spec)  # ノート情報を100件取得

for note_guid in notes_metadata_list.notes:
    note = note_store.getNote(note_guid.guid, True, False, False, False)
    print note.title

ちなみに note から取れる情報はこちら。
https://dev.evernote.com/doc/reference/Types.html#Struct_Note

13
14
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?