Skip to content

Instantly share code, notes, and snippets.

@raytiley
Created January 6, 2014 22:15
Show Gist options
  • Save raytiley/8290770 to your computer and use it in GitHub Desktop.
Save raytiley/8290770 to your computer and use it in GitHub Desktop.
<?php
echo "Create a show";
//Configure Script
date_default_timezone_set('America/New_York'); // Set this to timezone of Cablecast Server
$server = "http://demo.trms.com/"; //include trailing backslash
//End Configure
$server = $server."CablecastWS/CablecastWS.asmx?WSDL";
$client = new SoapClient($server); //Creates New SOAP client using WSDL file
$newShow = array(
'LocalID' => 'Sweet Local ID',
'LocationID' => 1,
'ProjectID' => 0,
'CGExempt' => 0,
'ProducerID' => 0,
'CategoryID' => 0,
'OnDemand' => 0,
'Comments' => '',
'OnDemandStatus' => '',
'BugText' => '',
'CrawlText' => '',
'CrawlLengthInSeconds' => 0,
'EventDate' => '2013-11-01T00:00:00',
'username' => 'admin',
'password' => 'demotrms',
'Title' => 'My Sweet Title',
'CGTitle' => 'My Sweet CG Title',
'Reels' => array(
array(
'FormatID' => 1,
'CueSeconds' => 22,
'LengthSeconds' => 300,
'Chapter' => 1,
'Title' => 1
)
),
'CustomFields' => array(
array(
'Name' => 'Field One',
'Value' => 'Data of my field'
),
array(
'Name' => 'Field Two',
'Value' => 'Data of My Field'
)
)
);
$result = $client->CreateNewShowRecord($newShow);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment