I want to create a custom function and then invoke it using REST APIs. It's not clear how to do that exactly on vtwsclib documentation.
For example i need to know how to create custom_wsmethod() to use it on the following example:
<?php
include_once('vtwsclib/Vtiger/WSClient.php');
$url = 'http://en.vtiger.com/wip';
$client = new Vtiger_WSClient($url);
$login = $client->doLogin('admin', 'KpS9EjNz16JtPmoe');
if(!$login) echo 'Login Failed';
else {
$response = $client->doInvoke(
'custom_wsmethod',
array( 'firstparam' => 'F', 'secondparam' => 'S',
'POST')
);
$wasError = $client->lastError();
if($wasError) {
var_dump($client->lastError());
} else {
// Take action on $response
}
}
?>