Package Data | |
---|---|
Maintainer Username: | sseffa |
Maintainer Contact: | karagozsefa@gmail.com (Sefa Karagöz) |
Package Create Date: | 2014-07-27 |
Package Last Update: | 2017-03-20 |
Home Page: | https://packagist.org/packages/sseffa/video-api |
Language: | PHP |
License: | Unknown |
Last Refreshed: | 2024-11-19 03:22:54 |
Package Statistics | |
---|---|
Total Downloads: | 17,251 |
Monthly Downloads: | 11 |
Daily Downloads: | 0 |
Total Stars: | 54 |
Total Watchers: | 8 |
Total Forks: | 21 |
Total Open Issues: | 1 |
composer require "sseffa/video-api": "dev-master"
Laravel | video-api :---------|:---------- 4.x.x | 1.x 5.x.x | 2.x
app/config/app.php
'providers' => array(
// ...
'Sseffa\VideoApi\VideoApiServiceProvider',
),
And:
'aliases' => array(
// ...
'VideoApi' => 'Sseffa\VideoApi\Facades\VideoApi',
),
<?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);
});