Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

getting video thumbnails from vimeo

Tags:

ios

vimeo

In my app i want to display the videos uploaded by a particular user in his Vimeo account. I have completed the OAuth steps and got the video_id's of the video's uploaded by user. I tried to download the thumbnails for videos so that they can be displayed in table view or collection view. Vimeo has provided the api method using that i got the response like this:

NSURL *url = [[NSURL alloc] initWithString:@"http://vimeo.com/api/rest/v2?format=json&method=vimeo.videos.getThumbnailUrls&video_id=72961770"];

but i pasted the user id there. i tried another approach so that the user id is loaded dynamically.

 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];

but i got an error saying that Msg = Method not found. can you help me to get the id dynamically or is there a way to give the video_id as a parameter to the url. Thank you

like image 750
Tejreddy Avatar asked Dec 18 '25 21:12

Tejreddy


1 Answers

create a string for url and paste until video_id=.

NSString *url = @"http://vimeo.com/api/rest/v2?format=json&method=vimeo.videos.getThumbnailUrls&video_id=";

and after that use stringByAppendingString method to append the video_id value to it and use it. This is also not a direct way but somehow enables you to get the video thumbnails dynamically without having to paste it

like image 176
BalaChandra Avatar answered Dec 21 '25 12:12

BalaChandra



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!