Skip to content
Laravel (Youtube/Vimeo) Video Data API
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/Sseffa/VideoApi Formatting YouTube duration in seconds Mar 19, 2017
tests First Draft Jul 27, 2014
.gitignore update video site enum Jul 28, 2014
.travis.yml update travis file Dec 14, 2015
LICENSE update video site enum Jul 28, 2014
README.md Update README.md Mar 16, 2017
composer.json laravel 5 Mar 6, 2015
phpunit.xml First Draft Jul 27, 2014

README.md

Laravel Video API

Latest Stable Version Total Downloads Build Status

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

Youtube API Key

<?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);
});

Licence

MIT license

You can’t perform that action at this time.