Ejemplo n.º 1
0
 /**
  * @param string $youtubeId
  * @return object
  * @throws Google_Exception
  */
 public function getMeta($youtubeId)
 {
     $url = 'https://www.googleapis.com/youtube/v3/videos?id=%s&part=contentDetails&key=%s';
     $key = $this->google->getConfig()->apiKey;
     $req = new Google_Http_Request(sprintf($url, $youtubeId, $key));
     $resp = $this->google->getClient()->execute($req);
     return array_pop($resp['items']);
 }