Jump to content

Evernote Python API Display Title of note


Recommended Posts

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

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

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
  • 1 year later...

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
  • 2 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...