nextras/youtube-api

Youtube API library for Nette Framework.

v3.1.0 2017-12-23 22:57 UTC

This package is auto-updated.

Last update: 2024-03-03 23:35:35 UTC


README

Downloads this Month Stable version

Installation

Use composer:

$ composer require nextras/youtube-api

Usage

$reader = new Nextras\YoutubeApi\Reader('<your google-api key>')
$video = $reader->getVideoByUrl('<youtube url>');

echo $video->title;
echo $video->duration; // in sec
echo $video->description;
echo $video->url;
echo $video->embed;
foreach ($video->thumbs as $thumb) {
    echo $video->url; 
}

License

MIT. See full license.