• Stars
    star
    397
  • Rank 108,561 (Top 3 %)
  • Language
    PHP
  • License
    Apache License 2.0
  • Created about 10 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Vimeo bridge for Laravel

Laravel Vimeo

vimeo

A Vimeo bridge for Laravel.

// Fetching data.
$vimeo->request('/users/dashron', ['per_page' => 2], 'GET');

// Upload videos.
$vimeo->upload('/home/aaron/foo.mp4');

// Want to use a facade?
Vimeo::uploadImage('/videos/123/images', '/home/aaron/bar.png', true);

Build Status StyleCI Coverage Status Latest Version License

Installation

Require this package, with Composer, in the root directory of your project.

$ composer require vimeo/laravel

Add the service provider to config/app.php in the providers array, or if you're using Laravel 5.5, this can be done via the automatic package discovery.

Vimeo\Laravel\VimeoServiceProvider::class

If you want you can use the facade. Add the reference in config/app.php to your aliases array.

'Vimeo' => Vimeo\Laravel\Facades\Vimeo::class

Configuration

Laravel Vimeo requires connection configuration. To get started, you'll need to publish all vendor assets:

$ php artisan vendor:publish --provider="Vimeo\Laravel\VimeoServiceProvider"

This will create a config/vimeo.php file in your app that you can modify to set your configuration. Also, make sure you check for changes to the original config file in this package between releases.

You are free to change the configuration file as needed, but the default expected values are below:

VIMEO_CLIENT=
VIMEO_SECRET=
VIMEO_ACCESS=

and for setting up the alternate connection...

VIMEO_ALT_CLIENT=
VIMEO_ALT_SECRET=
VIMEO_ALT_ACCESS=

Default Connection Name

This option default is where you may specify which of the connections below you wish to use as your default connection for all work. Of course, you may use many connections at once using the manager class. The default value for this setting is main.

Vimeo Connections

This option connections is where each of the connections are setup for your application. Example configuration has been included, but you may add as many connections as you would like.

Usage

VimeoManager

This is the class of most interest. It is bound to the ioc container as vimeo and can be accessed using the Facades\Vimeo facade. This class implements the ManagerInterface by extending AbstractManager. The interface and abstract class are both part of Graham Campbell's Laravel Manager package, so you may want to go and checkout the docs for how to use the manager class over at that repository. Note that the connection class returned will always be an instance of Vimeo\Vimeo.

Facades\Vimeo

This facade will dynamically pass static method calls to the vimeo object in the ioc container which by default is the VimeoManager class.

VimeoServiceProvider

This class contains no public methods of interest. This class should be added to the providers array in config/app.php. This class will setup ioc bindings.

Examples

Here you can see an example of just how simple this package is to use. Out of the box, the default adapter is main. After you enter your authentication details in the config file, it will just work:

// You can alias this in config/app.php.
use Vimeo\Laravel\Facades\Vimeo;

Vimeo::request('/me/videos', ['per_page' => 10], 'GET');
// We're done here - how easy was that, it just works!

Vimeo::upload('/bar.mp4');
// This example is simple and there are far more methods available.

The Vimeo manager will behave like it is a Vimeo\Vimeo. If you want to call specific connections, you can do that with the connection method:

use Vimeo\Laravel\Facades\Vimeo;

// Writing this…
Vimeo::connection('main')->upload('/bar.mp4');

// …is identical to writing this
Vimeo::upload('/bar.mp4');

// and is also identical to writing this.
Vimeo::connection()->upload('/bar.mp4');

// This is because the main connection is configured to be the default.
Vimeo::getDefaultConnection(); // This will return main.

// We can change the default connection.
Vimeo::setDefaultConnection('alternative'); // The default is now alternative.

If you prefer to use dependency injection over facades like me, then you can inject the manager:

use Vimeo\Laravel\VimeoManager;

class Foo
{
    protected $vimeo;

    public function __construct(VimeoManager $vimeo)
    {
        $this->vimeo = $vimeo;
    }

    public function bar()
    {
        $this->vimeo->upload('/foo.mp4');
    }
}

App::make('Foo')->bar();

Documentation

There are other classes in this package that are not documented here. This is because the package is a Laravel wrapper of the official Vimeo package.

License

Apache License 2.0 Β© Vimeo

More Repositories

1

psalm

A static analysis tool for finding errors in PHP applications
PHP
5,545
star
2

player.js

Interact with and control an embedded Vimeo Player.
JavaScript
1,432
star
3

graph-explorer

A graphite dashboard powered by structured metrics
Python
1,060
star
4

php-mysql-engine

A MySQL engine written in pure PHP
PHP
547
star
5

vimeo.php

Official PHP library for the Vimeo API.
PHP
450
star
6

player-api

Examples for our JavaScript and ActionScript player APIs.
449
star
7

stag-java

Speedy Type Adapter Generation
Java
350
star
8

VIMVideoPlayer

Deprecated: Please use [PlayerKit]( https://github.com/vimeo/PlayerKit) instead.
Objective-C
281
star
9

vimeo.js

Official Node.js library for the Vimeo API.
JavaScript
267
star
10

vimeo-oembed-examples

Some examples of how to use our oEmbed endpoint
HTML
237
star
11

vimeo-unity-sdk

Easily stream your Vimeo videos into Unity or record and publish out to Vimeo.
C#
210
star
12

vimeo.py

Official Python library for the Vimeo API.
Python
210
star
13

graphite-influxdb

An influxdb backend for Graphite-web and graphite-api
Python
198
star
14

vimeo-php-lib

Our official PHP library for the Advanced API.
PHP
180
star
15

tailgate

Tailgate is a nodejs app to pipe `tail -F` into websockets. It's a very simple way to have real-time access to your logs.
JavaScript
164
star
16

PlayerKit

Swift
154
star
17

ABLincoln

A library for online experiments.
PHP
152
star
18

py-money

Money class for Python 3
Python
125
star
19

vimeo-networking-java

The Vimeo Java (Android) SDK
Kotlin
121
star
20

vimeo-threejs-player

A plugin for streaming video from Vimeo to WebGL/VR/AR apps
JavaScript
89
star
21

tattletale.js

A utility to send console logs over XHR for server-side processing.
JavaScript
87
star
22

VimeoNetworking

The Vimeo API iOS SDK
Swift
84
star
23

vimeo-depth-player

A WebVR volumetric video renderer that uses color-depth based videos hosted on Vimeo.
JavaScript
83
star
24

aframe-vimeo-component

Stream Vimeo videos into WebVR.
JavaScript
81
star
25

simple-black-box

A simple black-box behavior testing framework
Shell
68
star
26

pentagon

Vault <-> Kubernetes Secrets
Go
60
star
27

libvmod-boltsort

A fast Varnish module for sorting query string parameters.
C
59
star
28

VimeoUpload

The Vimeo iOS Upload SDK
Swift
59
star
29

whisper-to-influxdb

migrate (import) graphite data from whisper to influxdb
Go
58
star
30

smoketcp

Smokeping like tcp connectivity tester, reports to statsd. written in Golang
Go
58
star
31

VIMNetworking

The Vimeo iOS SDK
Objective-C
58
star
32

vimeo-depth-viewer

OpenGL application for viewing depth and color video streams from Intel RealSense cameras
C++
53
star
33

carbon-tagger

native tag-based metrics for graphite/carbon
Go
50
star
34

iris

Vimeo Design System
TypeScript
47
star
35

go-util

Small reusable Go functions.
Go
44
star
36

Blueprint

aka How We Collaborate
42
star
37

graphite-api-influxdb-docker

docker image with graphite-api and graphite-influxdb
Shell
39
star
38

go-magic

Go Bindings for libmagic and an idiomatic API for getting a file's MIME type.
Go
39
star
39

rollup-plugin-bundle-size

A rollup plugin to show the size of the generated bundle(s).
JavaScript
27
star
40

vimeo-maxmsp

Play and manipulate Vimeo videos in Max/MSP and Jitter
Max
24
star
41

dials

Dials is an extensible configuration package for Go.
Go
18
star
42

VIMDeeplink

Simple Objc and Swift wrappers around the Vimeo iOS deeplink API
Swift
17
star
43

openapi

An OpenAPI specification for the Vimeo API.
16
star
44

puppet-diamond

diamond module for puppet
Puppet
15
star
45

nagios-cloudwatch-plugin

AWS CloudWatch check Nagios plugin
Python
14
star
46

elevator

Validate and patch AV1 levels
Rust
13
star
47

puppet-statsd

statsd module for puppet
Puppet
11
star
48

VIMUpload

This library has been deprecated, use VimeoUpload instead
Objective-C
11
star
49

go-hammer

Go
10
star
50

babel-plugin-transform-i18n

A Babel transform plugin to replace strings with their translations.
JavaScript
10
star
51

VIMObjectMapper

An automatic JSON to model object converter
Objective-C
9
star
52

leaderelection

Go
9
star
53

go-clocks

A convenient package providing a Clock abstraction in Go
Go
9
star
54

go-taglog

Based on, and compatible with, the Go standard log package, but also provides additional functionality and features such as tagging.
Go
8
star
55

ios-labs-staffpicks

An iOS Labs sample project
Swift
7
star
56

grouplogger

Go
6
star
57

netstorage

go client for the new Akamai Netstorage http api
Go
6
star
58

zendesk-ticket-history

JavaScript
6
star
59

caps

Go package to read/write popular video caption formats(mostly a port of pycaption)
Go
6
star
60

Uniform

Swift
6
star
61

alog

Another Go Logging Package
Go
5
star
62

vimeo-deeplink-android

A helper library to deep link into the official Vimeo Android App
Java
5
star
63

vimeo-live-player-examples

Example application for using Vimeo Live M3U8 links with third-party players
HTML
5
star
64

graph-explorer-docker

Shell
5
star
65

eslint-config-player

ESLint config for all player team projects.
JavaScript
5
star
66

go-iccjpeg

A small utility package to extract ICC profiles from JPEGs.
Go
4
star
67

graphite-go

Go
4
star
68

go-imgparse

A small go library to efficiently parse the resolution of various image format streams.
Go
4
star
69

go-retry

A small package for doing comprehensive retries.
Go
4
star
70

omnipay-bluesnap

BlueSnap driver for the Omnipay PHP payment processing library
PHP
4
star
71

payment-gateway-logger

PHP
3
star
72

av1stats

An AV1 stream analysis CLI tool
Rust
3
star
73

omnipay-vindicia

Vindicia driver for the Omnipay PHP payment processing library
PHP
3
star
74

genepool

A golang package for building generic workpools in a standardized way
Go
2
star
75

VimeoCommon

1
star
76

k8swatcher

Convenient watching interface for Kubernetes.
Go
1
star
77

policy

1
star