Hi there. My first question here, after enjoying lots og other peoples questions and answers. Thanks for that :)
Im trying to work with vimeo's api, and im getting a response I can't figure out to use as I intend. I think its simple for some of you guys, but can't wrap my head around it.
I got a bunch of video id's that I need to get the thumbnail url for. I would like to "ask" the response "What's the thumb url for this id" and loop though all my id's like that.
The response object looks like this in a stripped down version:
stdClass Object
(
[videos] => stdClass Object
(
[video] => Array
(
[0] => stdClass Object
(
[id] => 8128888
[thumbnails] => stdClass Object
(
[thumbnail] => Array
(
[0] => stdClass Object
(
[height] => 75
[width] => 100
[_content] => http://ts.vimeo.com.s3.amazonaws.com/370/931/37093137_100.jpg
)
)
)
)
[1] => stdClass Object
(
[id] => 8760295
[thumbnails] => stdClass Object
(
[thumbnail] => Array
(
[0] => stdClass Object
(
[height] => 75
[width] => 100
[_content] => http://ts.vimeo.com.s3.amazonaws.com/417/146/41714684_100.jpg
)
)
)
)
)
)
)
I need to use it like this (again stripped down), its the quoted part I cant figure out:
<?php while ( $vid->fetchRecord() ) :
$vid_id = $vid->get_field('video');
$thumb = "find [video][thumbnail][0][_content] where [video][id] = $vid_id";
?>
<img src="<?php echo $thumb;?>"
<?php endwhile ?>
So, how close am I? :P