Youtube V3 api Load Multiple Playlists

徘徊边缘 提交于 2019-12-08 06:07:45

问题


I just want to load multiple playlists based on multiple playlistID's, the problem is playlistid can insert only not multiple comma seperated.

$PlylistIds = 'PLbVdwtmx18stbIbCu-bONmOSP4JLOPF9I, PL7668E699EA971785';

$response = file_get_contents("https://www.googleapis.com/youtube/v3/playlistItems?part=contentDetails,snippet&playlistId=$PlylistIds&maxResults=5&key=MYAPIKEY");
$searchResponse = json_decode($response,true);
print_r($searchResponse);

When i sent 1 playlist id it works but when i add two playlist ids its stop returning json result.

I don't want to use LOOP everytime to send request to google server, is it possible to load multiple playlistids at one request, instead of using multiple loops.

Thanks

来源:https://stackoverflow.com/questions/32180633/youtube-v3-api-load-multiple-playlists

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!