gpt4 book ai didi

iphone - 使用 Evernote API 创建笔记

转载 作者:行者123 更新时间:2023-12-03 20:15:07 25 4
gpt4 key购买 nike

EvernoteNoteStore *noteStore = [EvernoteNoteStore noteStore];
EDAMNote *note = [[EDAMNote alloc] init];
[note setTitle:@"Test Note from EvernoteCounter for iPhone"];
[note setContent:[ [NSString alloc] initWithFormat:@"<en-note>%@</en-note>",@"tete"];
[noteStore createNote:(note) success:^(EDAMNote *note) {
NSLog(@"Received note guid: %@", [note guid]);
}failure:^(NSError *error) {
NSLog(@"Create note failed: %@", error);
}];

我使用此代码激活了 Evernote 的 createNote。但 createNote 不会返回任何值 - 它被困在称为 async 的内部 api 函数之一中。有没有人尝试使用 iOS SDK 上的 API 创建新笔记,并且实际上在他们的 Evernote 帐户上获取了该笔记?

最佳答案

我们刚刚添加了一些新的示例代码来创建照片笔记。请查看:https://github.com/evernote/evernote-sdk-ios 。创建注释的正确方法是使用:

- (id) initWithGuid: (EDAMGuid) guid title: (NSString *) title content: (NSString *) content contentHash: (NSData *) contentHash contentLength: (int32_t) contentLength created: (EDAMTimestamp) created updated: (EDAMTimestamp) updated deleted: (EDAMTimestamp) deleted active: (BOOL) active updateSequenceNum: (int32_t) updateSequenceNum notebookGuid: (NSString *) notebookGuid tagGuids: (NSArray *) tagGuids resources: (NSArray *) resources attributes: (EDAMNoteAttributes *) attributes tagNames: (NSArray *) tagNames;

另请参阅:http://dev.evernote.com/documentation/reference/Types.html#Struct_Note了解更多信息。

关于iphone - 使用 Evernote API 创建笔记,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13257288/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com