-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
13 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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). | ||
|
@@ -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). |