1
我正在開發一個iPhone應用程序,而不是使用Google應用程序API。批量操作Google Docs API獲取ACL
我正在提取Google文檔中的所有文檔,並且想要爲每個文檔提取ACL。我可以通過撥打電話:
[service fetchFeedWithURL:entry.ACLFeedLink.URL completionHandler:^(GDataServiceTicket *ticket, GDataFeedBase *ACLFeed, NSError *error){
}];
但是因爲我想爲每個文檔都有ACL,所以這將需要很多請求。我可以使用批處理操作嗎?
我曾嘗試以下:
GDataFeedBase *batchFeed = [[GDataFeedBase alloc] init];
NSURL *batchUrl = [[feed batchLink] URL];
GDataBatchOperation *batchOperation = [GDataBatchOperation batchOperationWithType:kGDataBatchOperationQuery];
[batchFeed setBatchOperation:batchOperation];
GDataEntryBase *entryACL = [[GDataEntryBase alloc] init];
[entryACL setIdentifier:[[[[feed entries] objectAtIndex:0] ACLFeedLink] href]];
[batchFeed addEntryWithEntry:entryACL];
[service fetchFeedWithBatchFeed:batchFeed forBatchFeedURL:batchUrl completionHandler:^(GDataServiceTicket *ticket, GDataFeedBase *feed, NSError *error){
}];
但它doenst工作。我只獲取實際文檔而不是ACL源。
任何人都可以幫助我嗎?謝謝。
非常感謝你。這正是我需要的! – Peter