test for api version
This commit is contained in:
parent
496039a627
commit
a1373b4e7c
@ -42,6 +42,7 @@ class LibXmlRpcCallbacks implements CallbackListener {
|
||||
* @param mixed $data
|
||||
*/
|
||||
public function handleScriptCallback($name, $data) {
|
||||
var_dump($name);
|
||||
switch ($name) {
|
||||
//New callbacks
|
||||
case 'XmlRpc.CallbacksList':
|
||||
|
@ -30,6 +30,13 @@ class ModeScriptEventManager {
|
||||
*/
|
||||
public function enableCallbacks() {
|
||||
$this->maniaControl->getClient()->triggerModeScriptEvent('XmlRpc.EnableCallbacks', array('true'));
|
||||
|
||||
$this->setApiVersion();
|
||||
|
||||
$this->getAllApiVersions();
|
||||
|
||||
$this->getCallbacksList(); //TODO verify why this does not work
|
||||
var_dump("test");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -38,4 +45,24 @@ class ModeScriptEventManager {
|
||||
public function disableCallbacks() {
|
||||
$this->maniaControl->getClient()->triggerModeScriptEvent('XmlRpc.EnableCallbacks', array('false'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $responseId
|
||||
* Triggers a Callback List Callback
|
||||
*/
|
||||
public function getCallbacksList($responseId = "DefaultResponseId"){
|
||||
$this->maniaControl->getClient()->triggerModeScriptEvent('XmlRpc.GetCallbacksList', array($responseId));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the Api Version
|
||||
* @param string $version
|
||||
*/
|
||||
public function setApiVersion($version = "1.2.3-beta.4.5.6+build789"){ //TODO constant of API Versions
|
||||
$this->maniaControl->getClient()->triggerModeScriptEvent('XmlRpc.SetApiVersion', array($version));
|
||||
}
|
||||
|
||||
public function getAllApiVersions($responseId = "DefaultResponseId"){
|
||||
$this->maniaControl->getClient()->triggerModeScriptEvent('XmlRpc.GetAllApiVersions', array($responseId));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user