pfwd/vimeo-entities

A set of PHP entities that represent the Vimeo API responses

v1.0.3 2019-03-17 13:58 UTC

This package is auto-updated.

Last update: 2024-04-18 02:14:53 UTC


README

A set of PHP entities that represent the Vimeo API responses Includes Hydrators that populate the entities from the responses

Usage

# ..

use PFWD\Vimeo\Hydrator\Type\Video;

// Get response
$client->request('/me/videos/', array(), 'GET');
$dataSet = $response['body']['data'];

// Loop over each video in the data set and hydrate a new Video entity
foreach($dataSet as $data) {
    $hydrator = new Video($data);
    $video = $hydrator->getEntity();
}
# ..

TODO

Only Video details are working at the moment

Install

$ composer require "pfwd/vimeo-entities"

Tests

To run tests

$ bin/phpstan analyse --level=7 src
$ bin/codecept run unit