public function upload()
 {
     $url = 'https://api.revver.com/xml/1.0?login='******'&passwd=' . $this->password;
     //$url = 'https://api.revver.com/xml/1.0';
     echo "Url: {$url}<br>";
     $api = new RevverAPI($url);
     // production
     // $api = new RevverAPI ( 'https://api.staging.revver.com/xml/1.0?login=revtester&passwd=testacct' ); // staging
     $results = $api->callRemote('user.authenticate', $this->userName, $this->password);
     echo '<pre>';
     var_dump($results);
     echo '</pre><br>';
     $count = 1;
     $token = $api->callRemote('video.getUploadTokens', $count);
     echo "token:<br>";
     var_dump($token);
     echo "<br>";
     $options = array('url' => $this->video->link, 'author' => ArticleAuthor, 'description' => $this->getWebDescription());
     $videoID = $api->callRemote('video.create', $token, $this->getWebTitle(), $this->getWebKeywords(), 1, $options);
     echo "videoID:<br>";
     var_dump($videoID);
     echo "<br>";
     $response = $api->callRemote('video.get', $videoID, array('flashMediaUrl'));
     echo "video.get response:<br>";
     var_dump($response);
     echo "<br>";
     $this->uploadLocation = $response['flashMediaUrl'];
     return $response;
 }
<?php

/*
video.getUploadTokens
Return 1 upload token for a new video to be owned by blackbeard.
*/
include 'xmlrpc-2_1/lib/xmlrpc.inc';
include 'class.RevverAPI.php';
$api = new RevverAPI('https://api.staging.revver.com/xml/1.0?login=revtester&passwd=testacct');
$count = 1;
$options = array('owner' => 'blackbeard');
$results = $api->callRemote('video.getUploadTokens', $count, $options);
echo '<pre>';
var_dump($results);
echo '</pre>';
Example #3
0
<?php

/*
video.create
Create the metadata for video 65535.
*/
include 'xmlrpc-2_1/lib/xmlrpc.inc';
include 'class.RevverAPI.php';
$api = new RevverAPI('https://api.staging.revver.com/xml/1.0?login=revtester&passwd=testacct');
$id = 65535;
$title = 'My New Parrot';
$keywords = array('parrot', 'pet');
$ageRestriction = 1;
$options = array('url' => 'arrvideos.example.com', 'author' => 'Billy Doyle');
$results = $api->callRemote('video.create', $id, $title, $keywords, $ageRestriction, $options);
echo '<pre>';
var_dump($results);
echo '</pre>';