Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
madcoda authored Nov 2, 2016
1 parent 31e9613 commit 5330796
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ Please read the wiki on how to use this library with [PHP with composer](https:/

For the functions implemented in this library, please visit [API Reference](https://github.com/madcoda/php-youtube-api/wiki/api-reference)

### Example usage with pure PHP (with composer)
```php
require 'vendor/autoload.php';
$youtube = new Madcoda\Youtube\Youtube(array('key' => '* Your API key here *'));
$video = $youtube->getVideoInfo('rie-hPVJ7Sw');
```

### Example usage with Laravel 4/5
```php
$video = Youtube::getVideoInfo(Input::get('vid', 'dQw4w9WgXcQ');
```


## Format of returned data
The returnd json is decoded as PHP objects (not Array).
Expand All @@ -48,4 +60,4 @@ or send email to [email protected] :)

## License

Madcoda php-youtube-api is licensed under the [MIT License](http://opensource.org/licenses/MIT).
Madcoda php-youtube-api is licensed under the [MIT License](http://opensource.org/licenses/MIT).

0 comments on commit 5330796

Please sign in to comment.