ruby - when create note in evernote in evernote api, raise Evernote::EDAM::Error::EDAMUserException -
here full code, following code:
note_store = c.note_store note_title = ::time.now.to_s note_body = ::time.now.to_s n_body = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" n_body += "<!doctype en-n system \"http://xml.evernote.com/pub/enml2.dtd\">" n_body += "<en-n>#{note_body}</en-n>" ## create n object our_note = evernote::edam::type::note.new our_note.title = note_title our_note.content = n_body
i'm sure developer token can work search evernote notes, when create note, raise error
the full error is:
<evernote::edam::error::edamuserexception errorcode:enml_validation (11), parameter:"element type \"en-n\" must declared.">
see here, following code work
note_store = c.note_store note_title = ::time.now.to_s note_body = <<-content <?xml version="1.0" encoding="utf-8"?> <!doctype en-note system "http://xml.evernote.com/pub/enml2.dtd"> <en-note>#{::time.now}</en-note> content ## create n object our_note = evernote::edam::type::note.new our_note.title = note_title our_note.content = note_body;
Comments
Post a Comment