public function testUploadVideo()
 {
     $guid = Vzaar::uploadVideo(self::$filePath);
     $videoId = Vzaar::processVideo($guid, "for deletion", "php test", "");
     $json = json_decode(Vzaar::deleteVideo($videoId));
     $this->assertEquals($json->video_status_id, 9);
 }
 public function testLinkUpload()
 {
     $title = "api-php-link-upload-" . generateRandomStr(5);
     $videoId = Vzaar::uploadLink(self::$fileUrl, $title);
     $vid = Vzaar::getVideoDetails($videoId, true);
     $this->assertEquals($vid->videoStatusDescription, "Preparing");
     // clean up
     Vzaar::deleteVideo($videoId);
 }
 public function testUploadVideo()
 {
     $title = "api-php-" . generateRandomStr(5);
     $guid = Vzaar::uploadVideo(self::$filePath);
     $videoId = Vzaar::processVideo($guid, $title, "php test", "");
     $vid = Vzaar::getVideoDetails($videoId, true);
     $this->assertEquals($vid->videoStatusDescription, "Preparing");
     // clean up
     Vzaar::deleteVideo($videoId);
 }
Пример #4
0
<?php

/*
 * @author skitsanos
 */
require_once '../src/Vzaar.php';
Vzaar::$secret = 'YOUR_VZAAR_USERNAME';
Vzaar::$token = 'API_TOKEN';
if (isset($_GET['id'])) {
    $res = Vzaar::deleteVideo($_GET['id']);
    print_r($res);
}
?>
<form method='get'>
Video Id: <input type='text' name='id' value='0'/>
<input type='submit'/>
</form>