This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I'm a python file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dev_token = "put your dev token here" | |
client = EvernoteClient(token=dev_token) | |
userStore = client.get_user_store() | |
user = userStore.getUser() | |
print user.username |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
noteStore = client.get_note_store() | |
notebook = Types.Notebook() | |
notebook.name = "My Notebook" | |
notebook = noteStore.createNotebook(notebook) | |
print notebook.guid |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
noteStore = client.get_note_store() | |
note = Types.Note() | |
note.title = "I'm a test note!" | |
note.content = '<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd">' | |
note.content += '<en-note>Hello, world!</en-note>' | |
note = noteStore.createNote(note) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
noteStore = client.get_note_store() | |
notebooks = noteStore.listNotebooks() | |
for n in notebooks: | |
print n.name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
client = EvernoteClient(token=auth_token) | |
userStore = client.get_user_store() | |
user = userStore.getUser() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Python OAuth example | |
import evernote.edam.userstore.constants as UserStoreConstants | |
import evernote.edam.type.ttypes as Types | |
from evernote.api.client import EvernoteClient | |
## | |
# Helper function to turn query string parameters into a | |
# Python dictionary | |
## |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git submodule add git://github.com/evernote/evernote-sdk-python/ evernote | |
git submodule init | |
git submodule update |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filter = NoteStore.NoteFilter() | |
filter.ascending = False | |
spec = NoteStore.NotesMetadataResultSpec() | |
spec.includeTitle = True | |
ourNoteList = noteStore.findNotesMetadata(authToken, filter, 0, 100, spec) | |
wholeNotes = [] | |
for note in ourNoteList.notes: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filter = NoteStore.NoteFilter() | |
filter.ascending = False | |
spec = NoteStore.NotesMetadataResultSpec() | |
spec.includeTitle = True | |
ourNoteList = noteStore.findNotesMetadata(authToken, filter, 0, 100, spec) | |
for note in ourNoteList.notes: | |
print "%s :: %s" % (note.guid, note.title) |