Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * exemplo de uso da classe YoutubeAPI3 >> http://pastebin.com/pM1SVipb
- */
- //recuperar os dados do vĂdeo especifico
- $id_video = "OBl4pp0Sfko";
- $api = new YoutubeAPI3('videos',$id_video,array('snippet','contentDetails','statistics','status'));
- if (!$api->isValidResponse()){
- throw new Exception($api->getErrorDescription());
- }
- ///para retornar os dados
- $json = $api->getJSON(); ///retorna o json conforme esta na API do Youtube
- ///ou
- $json = $api->fetchVideoData(); ///retorna um json personalizado mais limpo
- print_r($json);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement