Creating and uploading to a room

Note: This acticle assumes you’ve registered for an API Key and are using a VyewAPI Wrapper Class to help you construct calls to the server.


require_once("VyewAPI.php");
$vyew = new VyewAPI($YOUR_API_KEY, $YOUR_API_SECRET);

//Returns an array
$result=$vyew->create('new_room_name');
list($statusCode, $statusMsg, $roomID, $roomURL)=$result;

if ($statusCode==1) {
   $result=$vyew->import($roomID, 'post:test.doc');
   if ($result[0]!=1) echo "FAIL: Importing file.\n";
   else echo "Import OK.\n";
}

Updated: September 26th, 2012 · Tags:

Article not helpful? Please leave us feedback...

This site uses a Hackadelic PlugIn, Hackadelic SEO Table Of Contents 1.6.0.