public function youtube_make_public($VideoTask) { //mark the task as working $this->create(); $this->id = $VideoTask['VideoTask']['id']; $this->save(array("task_status" => "working")); $ShareParam = ClassRegistry::init("DailyopsShareParameter"); App::import("Vendor", "YoutubeApi", array("file" => "YoutubeApi.php")); $yt = new YoutubeApi(); //get the data $param = $ShareParam->findById($VideoTask['VideoTask']['foreign_key']); $data = unserialize($param['DailyopsShareParameter']['parameters']); $yt->updatePrivacy($param['DailyopsShareParameter']['foreign_key'], false, $data); //mark the task as completed $this->create(); $this->id = $VideoTask['VideoTask']['id']; $this->save(array("task_status" => "completed")); }
public function ajax_list_youtube($hidden = true) { App::import("Vendor", "YoutubeApi", array("file" => "YoutubeApi.php")); $yt = new YoutubeApi(); $videos = $yt->getAllVideos(); $this->set(compact("videos")); }
public function yt_get_video() { App::import("Vendor", "YoutubeApi", array("file" => "YoutubeApi.php")); $yt = new YoutubeApi(); $video = $yt->returnVideoEntry('hAtJ6Epqd6Y'); die(print_r($video)); }