\VimeoService
Service class to interface SilverStripe with the Vimeo video sharing service.
- Author: Ronald Ferguson
Synopsis
class VimeoService
extends RestfulService
{
- // members
- protected static integer $player_width = 400;
- protected static integer $player_height = 225;
- protected static $api_key;
- protected static $api_secret_key;
- protected static $token;
- protected static $token_secret;
- public static string $api_base_url = 'http://vimeo.com/api/rest/v2';
- protected $video_count;
- protected $page_count;
- // methods
- public void __construct()
- public void errorCatch()
- public static void setAPIKey()
- public static void setSecretKey()
- public static void setDefaultWidth()
- public static void setDefaultHeight()
- public static void getDefaultHeight()
- public static void getDefaultWidth()
- public DataObjectSet getVideoFeed()
- public ArrayData getSingleVideo()
- private array _extractVideoInfo()
- protected string _generateNonce()
- protected string _generateSignature()
- public DataObjectSet getVideosByUser()
- public DataObjectSet getVideosByGroup()
- public DataObjectSet getVideosByAlbum()
- public ArrayData getVideoById()
- public static mixed url_encode_rfc3986()
Hierarchy
Extends
- RestfulService
Members
protected
-
$api_key
API key supplied by Vimeo to use the advanced api -
$api_secret_key
API key secret supplied by Vimeo for use with the API key - $page_count — integer
-
$player_height
Default player height -
$player_width
Default player width - $token
- $token_secret
- $video_count — integer
public
-
$api_base_url
Base URL for the Vimeo advanced api
Methods
private
- _extractVideoInfo() — Extracts and populates an array structure with the video information returned from Vimeo for a single video object.
protected
- _generateNonce() — Generates unique identifier used in OAuth signature.
- _generateSignature() — Generates OAuth signature required to call Vimeo advanced API functions.
public
- __construct() — Constructor
- errorCatch()
- getDefaultHeight()
- getDefaultWidth()
- getSingleVideo() — Returns a Vimeo video object
- getVideoById() — Gets specific Vimeo video.
- getVideoFeed() — Returns a collection of Vimeo videos for a given method.
- getVideosByAlbum() — Gets paged video list for videos of a specific Vimeo album.
- getVideosByGroup() — Gets paged video list for videos of a specific Vimeo group.
- getVideosByUser() — Gets paged video list for videos of a specific user.
- setAPIKey() — Set the API key supplied by Vimeo
- setDefaultHeight()
- setDefaultWidth()
- setSecretKey() — Set the API key secret provided by Vimeo.
- url_encode_rfc3986() — URL encode a parameter or array of parameters.