sseffa / video-api
Laravel Video Data (youtube/vimeo) API
Installs: 17 249
Dependents: 0
Suggesters: 0
Security: 0
Stars: 54
Watchers: 8
Forks: 21
Open Issues: 1
Requires
- php: >=5.4.0
- illuminate/support: 5.*
README
Installation
1. Install with Composer
composer require "sseffa/video-api": "dev-master"
2. Add to app/config/app.php
'providers' => array( // ... 'Sseffa\VideoApi\VideoApiServiceProvider', ),
And:
'aliases' => array( // ... 'VideoApi' => 'Sseffa\VideoApi\Facades\VideoApi', ),
Usage
<?php Route::get('video/youtube/{id}', function ($id) { //$data = VideoApi::setType('youtube')->setKey('api-key')->getVideoDetail($id); // video detail $data = VideoApi::setType('youtube')->setKey('api-key')->getVideoList($id); // video list var_dump($data); }); Route::get('video/vimeo/{id}', function ($id) { //$data = VideoApi::setType('vimeo')->getVideoDetail($id); $data = VideoApi::setType('vimeo')->getVideoList($id); var_dump($data); });