Beispiel #1
0
 /**
  * Make a request to the Vimeo service
  * @param String $method
  * @param Array $params
  * @return Mixed
  */
 public function request($method, array $params)
 {
     return $this->_service->request($method, $params);
 }
Beispiel #2
0
 /**
  * Set Vimeo access token
  * @param Garp_Service_Vimeo_Pro $vimeo
  * @return Void
  */
 protected function _setVimeoAccessToken(Garp_Service_Vimeo_Pro $vimeo)
 {
     // See if the currently logged in user has Vimeo credentials related to her, and use the token
     // and token secret. That way a user can fetch private videos thru the API.
     $garpAuth = Garp_Auth::getInstance();
     if (!$garpAuth->isLoggedIn()) {
         return;
     }
     $currentUser = $garpAuth->getUserData();
     $authVimeoModel = new Model_AuthVimeo();
     $authVimeoRecord = $authVimeoModel->fetchRow($authVimeoModel->select()->where('user_id = ?', $currentUser['id']));
     if ($authVimeoRecord) {
         $vimeo->setAccessToken($authVimeoRecord->access_token);
         $vimeo->setAccessTokenSecret($authVimeoRecord->access_token_secret);
     }
 }