Java, Evernote : Searching notes by self-assigned ID -


i working on java project integrating evernote services. right now, able save, update notes, search notes. now, evernote tied our infrastructure, save id of object text copying evernote.

so, whenever text updated, same note evernote , update it's contents. these 2 problems facing :

  1. saving our primary key id in note object. tried guid, gets saved can see note in sandbox, have no idea how search notes guid. if guid shouldn't way, save primary key searchable.
  2. as mentioned in first point, attribute or variable should set can searchable.

here of saving , searching code have far :

note note = new note(); note.settitle("new title");  string nbody = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; nbody += "<!doctype en-note system \"http://xml.evernote.com/pub/enml2.dtd\">"; nbody += "<en-note>" + "test" + "</en-note>"; note.setcontent(nbody); note.setguid("1234");  note savednote =   notestoreclient.createnote(note); 

search code :

notefilter notefilter = new notefilter(); // can see, have no idea filter set here.  //  notefilter.gettagguids(id);  notelist notelist = notestoreclient.findnotes(notefilter,0,100);  list<note> notes = notelist.getnotes();  for(note note : notes){     system.out.println("note title "+note.gettitle()); } 

kindly let me know can do. lot. :-)

udpate

this happens when try save guid own randomly created one. error log :

edamuserexception(errorcode:bad_data_format, parameter:note.guid)        @ com.evernote.edam.notestore.notestore$getnote_result.read(notestore.java:13514)        @ com.evernote.edam.notestore.notestore$client.recv_getnote(notestore.java:1346)        @ com.evernote.edam.notestore.notestore$client.getnote(notestore.java:1316)        @ com.evernote.clients.notestoreclient.getnote(notestoreclient.java:368)        @ com.journaldev.spring.service.evernoteserviceimpl.findnotebyid(evernoteserviceimpl.java:157) 

you can't set manually assigned guid on note when creating - guids assigned service , returned on note object part of createnote call on notestore.

as aside, guids have format, see format here.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -