Laravel Video Api Save

Laravel (Youtube/Vimeo) Video Data API

Project README

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

Open Source Agenda is not affiliated with "Laravel Video Api" Project. README Source: sseffa/laravel-video-api
Stars
53
Open Issues
1
Last Commit
7 years ago
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating