client_id = $vimeoCredentials['client_id']; $this->client_secret = $vimeoCredentials['client_secret']; $this->access_token = $vimeoCredentials['access_token']; $this->authorize_url = $vimeoCredentials['authorize_url']; $this->callback_url = $vimeoCredentials['callback_url']; $this->public_url = $vimeoCredentials['public_url']; $this->ci =& get_instance(); $this->client = new Vimeo($this->client_id, $this->client_secret, $this->access_token); } /** * Get vimeo folder */ public function getFolder($folder_id) { return $this->client->request('/me/folders/'.$folder_id, array(), 'GET'); } /** * Get vimeo album */ public function getAlbum($showcase_id) { return $this->client->request('/me/albums/'.$showcase_id, array(), 'GET'); } /** * Get vimeo channel */ public function getChannel($channel_id) { return $this->client->request('/channels/'.$channel_id, array(), 'GET'); } /** * Get vimeo video */ public function getVideo($video_id) { if(empty($video_id) || is_null($video_id)) { return null; } return $this->client->request('/videos/'.$video_id, array(), 'GET'); } /** * Get vimeo user */ public function getUser($user_id) { return $this->client->request('/users/'.$user_id, array(), 'GET'); } public function getAuthorizeURL() { return $this->authorize_url; } public function getCallbackURL() { return $this->callback_url; } public function getPublicURL() { return $this->public_url; } public function getAccessToken() { return $this->access_token; } public function getClientSecret() { return $this->client_secret; } public function getClientId() { return $this->client_id; } public function getTutorial() { return $this->client->request('/tutorial', array(), 'GET'); } }