Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
hrach committed Sep 28, 2016
1 parent c3716a3 commit 95d8db5
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Nextras YoutubeApi
==================

[![Downloads this Month](https://img.shields.io/packagist/dm/nextras/youtube-api.svg?style=flat)](https://packagist.org/packages/nextras/youtube-api)
[![Stable version](http://img.shields.io/packagist/v/nextras/youtube-api.svg?style=flat)](https://packagist.org/packages/nextras/youtube-api)

### Installation

Use composer:

```bash
$ composer require nextras/youtube-api
```

### Usage


```php
$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;
foreach ($video->thumbs as $thumb) {
echo $video->url;
}
```

### License

MIT. See full [license](license.md).

0 comments on commit 95d8db5

Please sign in to comment.