在我的应用程序中,我想显示一个特定用户在他的Vimeo账户上上传的视频。 我已完成OAuth步骤并获得了用户上传的视频的video_id。我试图下载视频的缩略图,以便可以在表视图或集合视图中显示它们。Vimeo提供了API方法,使用该方法我得到了以下响应:
NSURL *url = [[NSURL alloc] initWithString:@"http://vimeo.com/api/rest/v2?format=json&method=vimeo.videos.getThumbnailUrls&video_id=72961770"];
但我已经将用户ID粘贴在那里了。我尝试了另一种方法,使得用户ID可以动态加载。
NSURL *url = [[NSURL alloc] initWithString:@"http://vimeo.com/api/rest/v2?format=json&method=vimeo.videos.getThumbnailUrls"];
OAMutableURLRequest *request = [[OAMutableURLRequest alloc]initWithURL:url consumer:consumer token:token realm:nil signatureProvider:nil];
OARequestParameter *p0 = [[OARequestParameter alloc] initWithName:@"video_id" value:[array objectAtIndex:0]];
NSArray *params = [NSArray arrayWithObject:p0];
[request setParameters:params];
但是我收到了一个错误,说Msg = 方法未找到。你能帮我动态获取id吗?或者有没有一种方法将video_id作为参数传递给url。谢谢。