Skip to content

Instantly share code, notes, and snippets.

@evernotegists
Created May 25, 2013 05:15
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evernotegists/5647989 to your computer and use it in GitHub Desktop.
Save evernotegists/5647989 to your computer and use it in GitHub Desktop.
list all shared notes
- (void) getAllSharedNotes {
EDAMNoteFilter *noteFilter = [[EDAMNoteFilter alloc] initWithOrder:0
ascending:YES
words:@"sharedate:*" notebookGuid:nil
tagGuids:nil
timeZone:nil
inactive:NO
emphasized:nil];
EDAMNotesMetadataResultSpec* metaDataResultSpec = [[EDAMNotesMetadataResultSpec alloc] initWithIncludeTitle:YES includeContentLength:YES includeCreated:NO includeUpdated:NO includeDeleted:NO includeUpdateSequenceNum:NO includeNotebookGuid:YES includeTagGuids:YES includeAttributes:YES includeLargestResourceMime:NO includeLargestResourceSize:NO];
__block NSInteger i = 0;
__block NSInteger totalNoteCount = 0;
do {
[[EvernoteNoteStore noteStore] findNotesMetadataWithFilter:noteFilter offset:i maxNotes:10 resultSpec:metaDataResultSpec success:^(EDAMNotesMetadataList *metadata) {
NSLog(@"Shared notes metadata : %@",metadata);
i += metadata.notes.count;
totalNoteCount = metadata.totalNotes;
} failure:^(NSError *error) {
NSLog(@"Error : %@",error);
}];
} while (i<totalNoteCount);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment