1

我想知道是否可以从 Evernote SDK 访问用户根据其 URL 公开共享的笔记?

显然,您可以在没有 API 的情况下将页面本身拉下,并且您不能以任何一种方式对其进行写入,但我想知道是否可以通过 API 获取只读副本,以便您无需获取便笺数据尝试不可靠的屏幕刮擦。

4

1 回答 1

3

是的你可以。共享笔记 url 的格式为:hostname/shard/shardId/notGUID/noteKey。

  1. 您可以解析此 URL,以分离出所有字段。然后,使用authenticateToSharedNote API。
  2. 然后,您可以使用AuthenticationResult创建一个便笺存储:

    sharedNoteStoreUrl = AuthenticationResult.noteStoreURL;

    TBinaryProtocol sharedNoteStoreProt = new TBinaryProtocol(new THttpClient(sharedNoteStoreUrl));

    NoteStore.Client sharedNoteStore = new NoteStore.Client(sharedNoteStoreProt,sharedNoteStoreProt);

  3. 然后,您可以使用步骤 2 中的身份验证令牌通过getNote API访问该笔记。

于 2013-04-30T03:13:25.820 回答