R
R
Roman Ogarkov2015-11-09 18:09:20
API
Roman Ogarkov, 2015-11-09 18:09:20

How to get a list of all downloaded VIMEO videos?

JSON returns only the 20 most recently uploaded video files.

https://vimeo.com/api/v2/user1666688/all_videos.json

How to get a list of all videos, there are more than 200 of them

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Max, 2015-11-09
@AloneCoder

Collect by page

page	int	No	The page number to show.
per_page	int	No	Number of items to show on each page. Max 50.

D
Dimonchik, 2015-11-09
@dimonchik2013

in a loop, all APIs work like this

R
Roman Ogarkov, 2015-11-10
@ogarich89

function getRandom(num){
  var my_num = Math.floor(Math.random()*num);
  return my_num;
}

var ids =[];
function randomVideo(){
    var randomID = getRandom(ids.length);
    var src = 'https://player.vimeo.com/video/'+ ids[randomID] +'?api=1&player_id=player1';
    $('#player1').attr('src', src);  
}
$(function() {
  var iframe = $('#player1')[0];
  var player = $f(iframe);

  // When the player is ready, add listeners for pause, finish, and playProgress
  player.addEvent('ready', function() {
      player.addEvent('finish', onFinish);
      player.api("play");
  });
  function onFinish(id) {
    randomVideo();
  }
});  
$.getJSON('https://vimeo.com/api/v2/user1666688/all_videos.json', function(data) {
  $.each(data, function(index, el) {
    id = el.id;
    ids.push(id)
  });
  randomVideo();
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question