vovanmix/laravel-4-video-api

There is no license information available for the latest version (dev-master) of this package.

Fork of sseffa/laravel-video-api v 1.0 for Laravel 4 with fixed Vimeo links

dev-master 2015-06-12 21:39 UTC

This package is not auto-updated.

Last update: 2024-11-13 08:16:51 UTC


README

Latest Stable Version Total Downloads Coverage Status

Installation

1. Install with Composer

composer require "Vovanmix/video-api": "dev-master"

2. Add to app/config/app.php

    'providers' => array(
        // ...
        'Vovanmix\VideoApi\VideoApiServiceProvider',
    ),

And:

    'aliases' => array(
        // ...
        'VideoApi'          => 'Vovanmix\VideoApi\Facades\VideoApi',
    ),

Usage

<?php

Route::get('video/youtube/{id}', function ($id) {

    //$data = VideoApi::setType('youtube')->getVideoDetail($id); // video detail
    $data = VideoApi::setType('youtube')->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