Вопрос

I'm wondering if its possible to access a note from the Evernote SDK that a user has shared publicly based on its URL?

Obviously you can pull the page itself down without the API, and you can't write to it either way, but I was wondering if it was possible to get a readonly copy via the API so that you could get the note data without having to attempt an unreliable screen scrape.

Это было полезно?

Решение

Yes, you can. The shared note url is of the format : hostname/shard/shardId/notGUID/noteKey .

  1. You can parse this URL, to get all the fields separated out. Then, use authenticateToSharedNote API.
  2. You can then use the AuthenticationResult to create a note store :

    sharedNoteStoreUrl = AuthenticationResult.noteStoreURL;

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

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

  3. You can then access the note with the getNote API, using the auth token from step 2.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top