This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE en-export SYSTEM "http://xml.evernote.com/pub/evernote-export3.dtd"> | |
<en-export export-date="20130730T205637Z" application="Evernote" version="Evernote Mac"> | |
<note> | |
<title>Test Note for Export</title> | |
<content> | |
<![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd"> | |
<en-note style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"> | |
Hello, World. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)createReminder { | |
NSString *noteContent = [NSString stringWithFormat:@"<?xml version=\"1.0\" encoding=\"UTF-8\"?>" | |
"<!DOCTYPE en-note SYSTEM \"http://xml.evernote.com/pub/enml2.dtd\">" | |
"<en-note>" | |
"Hello reminder!" | |
"</en-note>"]; | |
// Include NSDate+EDAMAdditions.h | |
NSDate* now = [NSDate date]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)stopSharingSingleNoteWithNoteGUID:(NSString*)noteGUID { | |
// Share a single note and return the public URL for the note | |
[[EvernoteNoteStore noteStore] stopSharingNoteWithGuid:noteGUID success:^{ | |
NSLog(@"Stopped sharing note"); | |
} failure:^(NSError *error) { | |
NSLog(@"Error : %@",error); | |
}]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)shareSingleNoteWithNoteGUID:(NSString*)noteGUID | |
withShardId:(NSString*)shardId { | |
// Share a single note and return the public URL for the note | |
[[EvernoteNoteStore noteStore] shareNoteWithGuid:noteGUID success:^(NSString *noteKey) { | |
NSString* shareURL = [NSString stringWithFormat:@"%@/shard/%@/sh/%@/%@",[[EvernoteSession sharedSession] host] ,shardId,noteGUID, noteKey]; | |
NSLog(@"Share URL : %@",shareURL); | |
} failure:^(NSError *error) { | |
NSLog(@"Error : %@",error); | |
}]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)getUserShardId { | |
//Get the User from userStore and return the user's shard ID | |
[[EvernoteUserStore userStore] getUserWithSuccess:^(EDAMUser *user) { | |
NSString* shardId = user.shardId; | |
NSLog(@"Shard id : %@",shardId); | |
} failure:^(NSError *error) { | |
NSLog(@"Error : %@",error); | |
}]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)downloadResourceExampleWithUserName:(NSString*) userName | |
withResourceGUID:(NSString*) resourceGUID{ | |
[[EvernoteUserStore userStore] getPublicUserInfoWithUsername:userName success:^(EDAMPublicUserInfo *info) { | |
NSString * resourceURL = [NSString stringWithFormat:@"%@/res/%@",[[EvernoteSession sharedSession] webApiUrlPrefix],resourceGUID]; | |
NSLog(@"Resource URL : %@",resourceURL); | |
} failure:^(NSError *error) { | |
NSLog(@"Error : %@",error); | |
}]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)getResourceWithGUID:(NSString*)resourceGUID { | |
[[EvernoteNoteStore noteStore] getResourceWithGuid:resourceGUID withData:YES withRecognition:NO withAttributes:YES withAlternateDate:NO success:^(EDAMResource *resource) { | |
NSData* fileContent = resource.data.body; | |
NSString* fileType = resource.mime; | |
NSString* fileName = resource.attributes.fileName; | |
} failure:^(NSError *error) { | |
NSLog(@"Error : %@",error); | |
}]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)getUserExample { | |
[[EvernoteUserStore userStore] getUserWithSuccess:^(EDAMUser *user) { | |
int64_t totalMonthlyQuota = [[user accounting] uploadLimit]; | |
[[EvernoteNoteStore noteStore] getSyncStateWithSuccess:^(EDAMSyncState *syncState) { | |
int64_t usedSoFar = [syncState uploaded]; | |
int64_t quotaRemaining = totalMonthlyQuota - usedSoFar; | |
NSDate* resetDate =[NSDate | |
endateFromEDAMTimestamp:[[user accounting] uploadLimitEnd]]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)makeNoteWithTitle:(NSString*)noteTile withBody:(NSString*) noteBody withResources:(NSMutableArray*)resources withParentBotebook:(EDAMNotebook*)parentNotebook { | |
NSString *noteContent = [NSString stringWithFormat:@"<?xml version=\"1.0\" encoding=\"UTF-8\"?>" | |
"<!DOCTYPE en-note SYSTEM \"http://xml.evernote.com/pub/enml2.dtd\">" | |
"<en-note>" | |
"%@",noteBody]; | |
// Add resource objects to note body | |
if(resources.count > 0) { | |
noteContent = [noteContent stringByAppendingString: | |
@"<br />"]; |