Skip to content

baraja-core/vimeo-video-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vimeo video API

Simple API wrapper for Vimeo. Czech documentation

Download video name, description, thumbnail, duration and more.

📦 Installation

It's best to use Composer for installation, and you can also find the package on Packagist and GitHub.

To install, simply use the command:

$ composer require baraja-core/vimeo-video-api

You can use the package manually by creating an instance of the internal classes, or register a DIC extension to link the services directly to the Nette Framework.

And simple create instance or create service:

service:
    - \Baraja\VimeoAPI\VimeoVideoAPI(%vimeo.referer%)

parameters:
    vimeo:
        referer: https://baraja.cz

Or manually:

$api = new \Baraja\VimeoAPI\VimeoVideoAPI;

$token = 0; // Some token as integer
$info = $api->getInfo($token);

echo var_dump($info);

// or specific information

echo 'Duration is: ' . $info->getDuration();

Referer

In new Vimeo API you must use http referer, it's domain name of your server where your API is hosted.

If the referrer is not listed, the baraja.cz is assumed.

📄 License

baraja-core/vimeo-video-api is licensed under the MIT license. See the LICENSE file for more details.