duanlongnao0028 2015-03-27 03:16
浏览 42

使用API​​按类别检索vimeo视频

Just trying to wrap my head around Vimeo API... I have succeeded fetching a list of videos by a search query:

$limit = 10; // number of videos to display
$vimeo = new phpVimeo($key, $secret);
$response = $vimeo->call('vimeo.videos.search', array('per_page' => $limit, 'query' => $query, 'sort' => 'relevant'));

However, when I'm trying to do the same thing to get the list of videos by category, I get 500 - internal server error. What am I missing?

    $limit = 10; // number of videos to display for each search
    $vimeo = new phpVimeo($key, $secret);
    $response = $vimeo->call('vimeo.categories.getRelatedVideos', array('per_page' => 10, 'category' => $videocategory));

$videocategory is existing Vimeo category that works in playground.

$key is my key

$secret is empty string

  • 写回答

1条回答 默认 最新

  • dsfdsf21312 2015-03-27 14:30
    关注

    This is the old API. It has been deprecated for months. You should be using the new API: https://developer.vimeo.com and the new PHP library: https://github.com/vimeo/vimeo.php

    You can learn about Vimeo's category API here: https://developer.vimeo.com/api/endpoints/categories

    评论

报告相同问题?