Exemplo n.º 1
0
 /**
  * Base method for performing an API call
  * @param $method
  * @param null $params
  * @param null $successCallback
  * @param null $errorCallback
  */
 public function call($method, $params = null, $successCallback = null, $errorCallback = null)
 {
     if ($this->credentials && $method != "Authenticate") {
         $params["credentials"] = ["userName" => $this->credentials->getUsername(), "sessionId" => $this->credentials->getSessionId(), "database" => $this->credentials->getDatabase()];
     }
     return $this->request($method, $params, $successCallback, $errorCallback);
 }