我可以使用V2 API的downloadUrl方法流式传输google驱动器的音乐文件,但V3 API中是否还有其他方法可以获取downloadUrl?
GTLQueryDrive *query =
[GTLQueryDrive queryForFilesList];
query.q = @"mimeType='audio/mpeg' or mimeType='audio/x-m4a'";
query.fields = @"files(id,name,parents,webContentLink)";
[self.service executeQuery:query completionHandler:^(GTLServiceTicket *ticket, id object, NSError *error) {
if (error == nil) {
GTLDriveFileList *fileList = (GTLDriveFileList *)object;
NSString *urlString = [NSString stringWithFormat:@"%@?alt=media", NSURLfileList.files[0].webContentLink];
AVPlayer(initWithUrl:songUrl).play() // abstract method for stream, ignore syntax
} else {
//error
}
}];
}