2017 © Pedro Peláez
 

library video-api

Gets the Videos from all the major video sharing websites. Supports Youtube, Dialymotion and Vimeo

image

leela/video-api

Gets the Videos from all the major video sharing websites. Supports Youtube, Dialymotion and Vimeo

  • Monday, May 4, 2015
  • by leelanarasimha
  • Repository
  • 1 Watchers
  • 1 Stars
  • 44 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 5 % Grown

The README.md

VideoApi

API for the video websites such as youtube, Vimeo and dailymotion, (*1)

Uses Strategy Design Pattern, (*2)

Begin by installing this package through Composer. Edit your project's composer.json file to require`., (*3)

"require": {
"leela/VideoApi": "0.1"
}

Next, update Composer from the Terminal:, (*4)

composer update

That's it! You're all set to go., (*5)

Usage for youtube video details

<?php
$youtubeapi = new \Leela\VideoApi(new \Leela\Services\YouTubeService());
$youtubeapi->getVideoDetails('x2on26a');

Usage for Vimeo video details

<?php
$vimeoapi = new \Leela\VideoApi(new \Leela\Services\VimeoService());
$vimeoapi->getVideoDetails('x2on26a');

Usage for Daily Motion video details

<?php
$dailymotionapi = new \Leela\VideoApi(new \Leela\Services\DailyMotionService());
$dailymotionapi->getVideoDetails('x2on26a');

Methods

1) getVideoDetails($videoId);

$videoId - Video Id of the youtube, Vimeo or the daily motion

Returns array of video details
array(
        'id' => $data->id,
        'title' => $data->title,
        'description' => $data->description,
        'thumbnail_small' => $data->thumbnail->sqDefault,
        'thumbnail_large' => $data->thumbnail->hqDefault,
        'duration' => $data->duration,
        'upload_date' => $data->uploaded,
        'like_count' => isset($data->likeCount) ? $data->likeCount : 0,
        'view_count' => isset($data->viewCount) ? $data->viewCount : 0,
        'comment_count' => isset($data->commentCount) ? $data->commentCount : 0,
        'uploader' => $data->uploader
        );

2)  getPlayer($videoId, $width, $height)
    $videoId  - Required (Video id of the youtube, Vimeo or the dailymotion)
    $width - Optional (width of the player)
    $height - Optional  (height of the player)

Returns the html data of the player, (*6)

Contributor

Leela Narasimha Reddy - leela@leelag.com, (*7)

Issues & Suggestions

Please report any bugs or feature requests here: https://github.com/leelanarasimha/VideoApi/issues, (*8)

The Versions

04/05 2015

dev-master

9999999-dev

Gets the Videos from all the major video sharing websites. Supports Youtube, Dialymotion and Vimeo

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by leela narasimha

04/05 2015

0.2

0.2.0.0

Gets the Videos from all the major video sharing websites. Supports Youtube, Dialymotion and Vimeo

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by leela narasimha

04/05 2015

0.1

0.1.0.0

Gets the Videos from all the major video sharing websites

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by leela narasimha