문제

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