Download the PHP package eleven59/vimeo-connector without Composer
On this page you can find all versions of the php package eleven59/vimeo-connector. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download eleven59/vimeo-connector
More information about eleven59/vimeo-connector
Files in eleven59/vimeo-connector
Package vimeo-connector
Short Description Helper class to connect to Vimeo and download video information based on video ID
License MIT
Homepage https://github.com/eleven59/vimeo-connector
Informations about the package vimeo-connector
VimeoConnector
Helper class to connect to Vimeo and download video information based on video ID or URL
This package provides a class with connection and helper functionality to allow gathering video information if you have the URL or ID. Made this just 'cause all those others out there were not to my particular liking.
Installation
Dependencies
This package was tested with
- PHP 7.3+ with ext-curl
- Laravel 8.0 (optional, but package includes an AddonServiceProvider for this)
Installation
Via Composer
Then add Vimeo key and secret to your .env file and you're good to go:
Connector functions
This package includes a single static class that will help you connect to Vimeo and get all the info you need if you have a Video Id. Does not (yet) work for events. If you only have an Url, see Helper functions below. Isn't that convenient?
Get all info as returned by Vimeo
Get all stills for a video
Instead of processing all that info yourself every time, why not use the built-in complementary function for that?
Get only the cover for the video
Now, why would you process all of those images yourself if you only want the biggest, baddest image on the block? This one returns the still that matches both the width and height of the video. It's probably the biggest and the best match. I know that's not always the best option, but it's a great approximation and there's always the function above if you need more nuance.
Helper functions
You can convert URLs to IDs for both events and videos. Isn't that great?
URL to ID
There are two ways to go about this. You can use the know-it-all function that will just give you an ID no matter if you use a video or event URL. If you need to validate that the link is either a video or an event, you are very welcome to try the separate functions instead.
ID to (Embed) URL
If you have either an Id or a full-fledged URL or even an embed code, these functions can translate any of those into either a Video URL or Ember URL, no questions asked.
Change log
Breaking changes will be listed here. For other changes see commit log.
Credits
License
This project was released under the MIT license, so you can install it on top of any Backpack & Laravel project. Please see the license file for more information.