【问题标题】:How to Retrieve Objective-c GData Video Description?如何检索 Objective-c GData 视频描述?
【发布时间】:2013-01-02 19:59:30
【问题描述】:
我一直在尝试使用 gdata Objective-c 检索 youtube 视频的描述。
我已经能够获得标题,但我如何获得描述?
标题代码:
GDataEntryBase *entry = [[feed entries] objectAtIndex:indexPath.row];
NSString *title = [[entry title] stringValue];
有什么想法吗?
【问题讨论】:
标签:
objective-c
xcode
youtube-api
【解决方案1】:
NSString *description=[(GDataEntryYouTubeVideo *)entry mediaGroup].mediaDescription.stringValue;
【解决方案2】:
Objective-C GData 库中 YouTube 视频的类是 GDataEntryYouTubeVideo,而不是 GDataEntryBase。
但旧的基于 XML 的 GData 库不再适合与 YouTube API 一起使用。应该改用newer JSON-based library。 JSON API 中的视频描述记录在here。