Kayla73 0 Posted January 10, 2020 Share Posted January 10, 2020 I've managed to have to the Evernote Python API work and display notes (using the getNoteContent(noteguid) directive). But I would just like to display the title of the note (not the notebook). The one that is referred as : note.title = "Test note from EDAMTest.py" When creating a note with NoteStore.createNote(note) I tried a thousand things, never made it work. Searched on the Internet for it, nothing. And to be honest, the Evernote API doc is lame and outdated. So please, does someone know how to do it? Right now, this is how I display the content of the note : mcdvoice note = note_store.getNoteContent(noteguid) notestr = ET.fromstring(note) for child in notestr: chose = check,' ',child.tail # that's the en-todo checklist type of note... Thank you in advance for any clue or answer! Link to comment
Ex Employees Scott T. 662 Posted January 10, 2020 Ex Employees Share Posted January 10, 2020 Hi @Kayla73. I hadn't installed the Python SDK before, so I followed the instructions from the API docs and tried out the sample client code (EDAMTest.py). The note.title worked fine for me (see below). What error are you seeing? created_note = note_store.createNote(note) print "Successfully created a new note with GUID: ", created_note.guid print "Note title: ", note.title Output: Is my Evernote API version up to date? True Found 1 notebooks: * First Notebook Creating a new note in the default notebook Successfully created a new note with GUID: 307ea2c2-a20f-48f8-bd3c-f9bcb96bd646 Note title: Test note from EDAMTest.py Link to comment
Ex Employees Scott T. 662 Posted January 10, 2020 Ex Employees Share Posted January 10, 2020 Here's sample code for fetching a note (vs. creating) import evernote.edam.notestore.ttypes as NoteStoreTypes print "Fetching the note again" note_result_spec = NoteStoreTypes.NoteResultSpec() fetched_note = note_store.getNoteWithResultSpec(created_note.guid,note_result_spec) print "Fetched note title: ", fetched_note.title Link to comment
bloodspork 0 Posted September 3, 2021 Share Posted September 3, 2021 Hi there. Python 2.7 evernote client installed via pip, import evernote.edam.notestore.ttypes as NoteStoreTypes NoteStoreTypes.NoteResultSpec is not defined. What am I missing? Is this technique obsolete? thanks Link to comment
bloodspork 0 Posted September 7, 2021 Share Posted September 7, 2021 Well this worked: noteStore.getNote(devToken, noteGuidStr, True, True, True, True) which appears to be an older version of the interface. What is the correct API to use & am I using it (by virtue of "pip install evernote")? Where is it documented? Thank you Link to comment
Level 5 PinkElephant 8,945 Posted September 7, 2021 Level 5 Share Posted September 7, 2021 Here you go: https://dev.evernote.com Link to comment
bloodspork 0 Posted September 15, 2021 Share Posted September 15, 2021 Yes, I'm aware that there is a dev portal thanks. On that very dev portal, please see: https://dev.evernote.com/doc/reference/NoteStore.html#Fn_NoteStore_getNoteWithResultSpec getNoteWithResultSpec() takes a type called NoteStoreTypes.NoteResultSpec, which is not defined in the python 2.7 API. Link to comment
Level 5 PinkElephant 8,945 Posted September 15, 2021 Level 5 Share Posted September 15, 2021 If you don't get it solved, contact support. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now