1
我使用Youtube v3 api,並且通過使用此調用獲取了所有類別的id。按類別搜索視頻id
$videoCategories = file_get_contents('https://www.googleapis.com/youtube/v3/videoCategories?part=snippet®ionCode=us&key=xxxx');
現在我想獲得前5名的視頻從美國4類(音樂)。
什麼是正確的url語法?另外我怎樣才能使用Youtube api實例向它編寫一個搜索數組?
例子:
$searchResponse = $youtube->search->listSearch('id,snippet', array(
'type' => 'video',
// 'q' => $_GET['q'],
'location' => 'us',
'maxResults' => 20,
));
謝謝:)