删除笔记本时,Evernote的webhook不会发送

时间:2016-07-08 11:19:43

标签: evernote

我从Evernote删除笔记本,但我的webapp没有收到与此操作相关联的webhook。理论上并遵循官方文档,我的webapp应该会收到类似的内容:

[base URL]/?userId=[user ID]&notebookGuid=[notebook GUID]&reason=notebook_update

此行为的主要问题是此笔记本中的笔记正在发送到Evernote上的垃圾箱,并且没有关于这些更改的webhook。

有谁知道这个问题背后的原因?还有其他选择要注意这种行为吗?

提前致谢

4 个答案:

答案 0 :(得分:0)

您是否收到确认您的webhook已设置?请再试一次?

对于其他人,仅供参考:我们确实密切关注Stackoverflow上标记的evernote问题。

答案 1 :(得分:0)

看看这个 - 结果我们(Evernote)目前不支持删除webhook通知,对不起。

答案 2 :(得分:0)

@akhaku再次感谢您的回答!只有一条评论澄清,对我来说这种行为有点奇怪,因为当我们删除一个音符时,我们收到的是这样的:

/音符整合/网络挂接/ Evernote的/用户id = XXXXXXXXX&安培;?GUID = YYYYYY&安培; notebookGuid = ZZZZZ&安培;原因=更新

但是,当我们删除笔记本时,我们没有收到有关笔记本及其笔记的任何信息。

从我的角度来看,至少我们应该在笔记本被删除时收到有关笔记本内部笔记的webhooks。在其他情况下,无法识别这种情况。

答案 3 :(得分:0)

是的,evernote并不支持webhook通知,因为有一些奇怪的原因已经通过evernote开发者支持确认了

可以检测到删除更改的唯一方法是通过轮询https://dev.evernote.com/doc/articles/polling_notification.php#webhooks

需要像下面的代码一样实现

int latestUpdateCount = ... // Persist this value

// Each time you want to check for new and updated notes...
SyncState currentState = noteStore.getSyncState();
int currentUpdateCount = currentState.getUpdateCount();

if (currentUpdateCount > latestUpdateCount) {

  // Something in the account has changed, so search for notes
  NotesMetadataList newNotes = noteStore.findNotesMetadata( ... );

  // Do something with the notes you found...
  for (NoteMetadata note : newNotes.getNotes()) {
    // ...
  }

  // Keep track of the new high-water mark
  latestUpdateCount = currentSyncState.getUpdateCount();
}
相关问题