baraja-core/vimeo-video-api

There is no license information available for the latest version (v1.4.1) of this package.

Simple API wrapper for Vimeo.

v1.4.1 2022-03-12 21:49 UTC

README

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.