I was using the Vimeo simple API to display the videos from a channel on my website, but as you may know, it has a limit. I was wondering if you could give me an example of how to use the advanced API. I have read the documentation, But I just don't know how to use those methods (obviously i am not php expert).
So it would be awesome if you could show me one example or any tutorial were I could understand it.
This is Part of the code I was using in the simple API:
var apiEndpoint = 'http://vimeo.com/api/v2/';
var oEmbedEndpoint = 'http://vimeo.com/api/oembed.json'
var oEmbedCallback = 'switchVideo';
var videosCallback = 'setupGallery&iframe=false';
$(document).ready(function() {
$.getScript(apiEndpoint + vimeoUsername + '/videos.json?callback=' + videosCallback);
});
function setupGallery(videos) {
for (var i = 0; i < videos.length; i++) {
var html = '<li><a href="' + videos[i].url +'"alt="'+videos[i].title+'"><img src="' + videos[i].thumbnail_large + '" class="thumb" />';
html += '<div><p>' + videos[i].title + '</p></div></a></li>';
$('#thumbs ul').append(html);
}
I just want to do the same but with the advance API (using php).
thanks a lot, I'd appreciate any advise.
A showcase (previously album) is a collection of videos for public or private sharing.
Working with Video Uploads. The Vimeo API includes a full set of features for uploading and managing video files. With this functionality, you can access all the amazing upload capabilities of vimeo.com through your own front end in your own application.
Simply put, if you want to embed Vimeo without iFrame, you will first need to click on the share button of the video. From there, a window will pop up, and you can click on the Show options button to use the old embed code choice to proceed with the project.
[edit] NOTE: This is the old, advanced API. It is no longer supported by Vimeo, or accessible by new app developers. Please refer to the new upload documentation at https://developer.vimeo.com/api/upload/videos
Once you have that, you need to create your vimeo object
// You must replace CONSUMER_KEY and CONSUMER_SECRET with the values from your app
$vimeo = new phpVimeo('CONSUMER_KEY', 'CONSUMER_SECRET');
Once you have the vimeo object, you can make api calls using the call
method. This method takes an api method.
$videos = $vimeo->call('VIMEO_METHOD');
For your specific use case, finding the videos uploaded by a user, you use the method vimeo.videos.getUploaded
. You can find more documentation (and try it out!) at the vimeo api playground
Once you understand all of that, I believe the following code would work for you.
$vimeo = new phpVimeo('CONSUMER_KEY', 'CONSUMER_SECRET');
$videos = $vimeo->call('vimeo.videos.getUploaded', array('user_id' => $vimeo_username));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With