Created
May 29, 2014 12:53
-
-
Save juizmill/e0f70788ba732f0d073f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| public function completeVideoVimeo(Array $data) | |
| { | |
| try{ | |
| $check = $this->vimeo->call('vimeo.videos.upload.checkTicket', array( | |
| 'oauth_token' => $this->config['vimeo']['token'], | |
| 'ticket_id' => $data['ticket'])); | |
| $complete = $this->vimeo->call('vimeo.videos.upload.complete', array( | |
| 'oauth_token' => $this->config['vimeo']['token'], | |
| 'ticket_id' => $check->ticket->id, | |
| 'filename' => $data['filename'])); | |
| $data['video_id'] = $complete->ticket->video_id; | |
| $this->vimeo->call('vimeo.videos.setTitle', array('video_id' => $complete->ticket->video_id, 'title' => $data['title'])); | |
| $this->vimeo->call('vimeo.videos.setDescription', array('video_id' => $complete->ticket->video_id, 'description' => $data['description'])); | |
| $this->vimeo->call('vimeo.videos.embed.setPreset', array('video_id' => $complete->ticket->video_id, 'preset_id' => '419504')); | |
| $this->vimeo->call('vimeo.channels.addVideo', array('channel_id' => $data['cd_channel'], 'video_id' => $complete->ticket->video_id)); | |
| return $data; | |
| }catch (\Exception $e){ | |
| Logger::writeLogger($e); | |
| return false; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment