Skip to content

Commit 5330796

Browse files
authored
Update README.md
1 parent 31e9613 commit 5330796

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,18 @@ Please read the wiki on how to use this library with [PHP with composer](https:/
3030

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

33+
### Example usage with pure PHP (with composer)
34+
```php
35+
require 'vendor/autoload.php';
36+
$youtube = new Madcoda\Youtube\Youtube(array('key' => '* Your API key here *'));
37+
$video = $youtube->getVideoInfo('rie-hPVJ7Sw');
38+
```
39+
40+
### Example usage with Laravel 4/5
41+
```php
42+
$video = Youtube::getVideoInfo(Input::get('vid', 'dQw4w9WgXcQ');
43+
```
44+
3345

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

4961
## License
5062

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

0 commit comments

Comments
 (0)