The DeleteProgram SOAP method allows you to programmatically delete content from your TelVue Princeton™ server.
You need to have installed:
http://myserver/program_service/wsdl
Substitute the hostname, domain, or IP Address of your server instead of myserver.
myserver
id
String
The ID parameter can also be determined by looking at URL paths in the web application. For example, the following URL from the content details page shows a Program ID of 4: http://myserver/content/show/4?more=HWTTTT
http://myserver/content/show/4?more=HWTTTT
Copy the Ruby script below to your system, with the following substitutions.
########################### # Example Ruby script to call the TelVue Corporation Delete SOAP Web Service ########################### require 'soap/wsdlDriver' begin service=SOAP::WSDLDriverFactory.new( 'http://192.168.1.150/program_service/wsdl' ).create_rpc_driver # Delete a content file with an ID of 13. response = service.DeleteProgram("13", api_key) puts response rescue Exception => e puts e.class puts e.message puts e.backtrace end end
This example assumes you have the PHP-Soap library installed. The syntax for other SOAP libraries would likely be different.
< ?php /** * Example PHP script to call the DeleteProgram() method of the * TelVue Corporation SOAP Web Service. */ try { $service = new SoapClient('http://192.168.50.57/program_service/wsdl'); /* Function Parameters and Maximum Lengths: DeleteProgram(Program ID, api_key); */ $result = $service->DeleteProgram('8', api_key); if ($result[0] == 'SUCCEEDED') { echo(' Program successfully deleted. '); } else { echo(' Failed. ' . $result[1] . ' '); } } catch (SoapFault $fault) { trigger_error( "SOAP Fault: ( faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring} )", E_USER_ERROR ); } ?>
200
SUCCEEDED
FAILED
User is not authorized: username
Program with id program_id does not exist.