baraja-core/vimeo-video-api

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

Simple API wrapper for Vimeo.

v1.2.0 2020-09-19 15:40 UTC

This package is auto-updated.

Last update: 2020-10-19 16:16:33 UTC


README

Simple API wrapper for Vimeo. Czech documentation

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

Install

By Composer:

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

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.