Evernote通过sourceURL查找注释

时间:2016-03-21 16:02:44

标签: evernote

我试图通过属性sourceURL搜索笔记,但似乎API正在剥离协议,结果没有结果。这是代码

    var notesTransport = new Thrift.Transport(
            Eventnote.Auth.oauth.getParameter(Eventnote.Auth.note_store_url_param));

    var notesProtocol = new Thrift.Protocol(notesTransport);
    var noteStore = new NoteStoreClient(notesProtocol, notesProtocol);
    if (!noteStore) {
      Eventnote.Logger.error("[EVERDU] Connection failure during getting note store");
      return;
    }

    var filter = new NoteFilter();
    filter.words = "sourceURL:" + url + "*";
    try {
      var results = noteStore.findNotes(Eventnote.Auth.get_auth_token(), filter,
        0, 100);
      ...

reasults对象看起来像这样

{
   "startIndex":0,
   "totalNotes":0,
   "notes":[

   ],
   "stoppedWords":null,
   "searchedWords":[
      "//github.com/sameersbn/docker-gitlab*"
   ],
   "updateCount":18461
}

我有什么遗失的吗?

1 个答案:

答案 0 :(得分:0)

不确定这是否是Evernote结尾的错误,但您可以在网址周围添加双引号以使其正常工作。

filter.words = "sourceURL:\"" + url + "*\"";