leandrodiogenes / video-api
There is no license information available for the latest version (2.3.1) of this package.
Laravel Video Data (youtube/vimeo) API
2.3.1
2020-08-13 14:15 UTC
Requires
- php: >=5.4.0
- illuminate/support: 5.*|^6.0|^7.0
This package is not auto-updated.
Last update: 2025-03-08 10:59:59 UTC
README
Installation
1. Install with Composer
composer require "sseffa/video-api": "dev-master"
Laravel | video-api |
---|---|
4.x.x | 1.x |
5.x.x | 2.x |
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); });