Componette

Componette

baraja-core

baraja-core / vimeo-video-api v1.4.1

Simple API wrapper for Vimeo.

download-cloud-line composer require baraja-core/vimeo-video-api

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.

price-tag-2-line

Badges

guide-fill

Dependencies

php (>=7.1.0)
ext-curl (*)
Componette Componette felix@nette.org