\Vision6Api
Api wrapper class.
- Author: Vision6
Synopsis
class Vision6Api
extends Object
{
- // members
- protected bool $apiKey = false;
- protected string $apirUrl = 'http://www.vision6.com.au/api/jsonrpcserver';
- protected string $apiVersion = '';
- protected bool $errorCode = false;
- protected bool $errorMessage = false;
- protected integer $requestId = 1;
- protected integer $timeout = 300;
- protected array $headers = ;
- protected bool $debug = false;
- // methods
- public void __construct()
- public mixed callMethod()
- public mixed __call()
- public void setApiUrl()
- public string getApiUrl()
- public void setAPIKey()
- public string getAPIKey()
- public void setApiVersion()
- public string getApiVersion()
- public void setTimeout()
- public int getTimeout()
- public void setHeaders()
- public array getHeaders()
- public bool hasError()
- public int getErrorCode()
- public string getErrorMessage()
- public void setDebug()
- public bool getDebug()
- protected mixed invokeMethod()
- protected mixed postRequest()
- protected void error()
Hierarchy
Extends
- Object
Members
protected
Methods
protected
- error() — Invokes the error handler.
- invokeMethod() — Perform an API method request.
- postRequest() — Post an API method request.
public
- __construct() — Constructor
- __call() — Call an API method.
- callMethod() — Call an API method.
- getAPIKey() — Get the API key used when making requests.
- getApiUrl() — Get the API endpoint URL.
- getApiVersion() — Get the API version used when making requests.
- getDebug() — Determine if request debugging is enabled.
- getErrorCode() — Get the error code from the last method call.
- getErrorMessage() — Get the error message from the last method call.
- getHeaders() — Get the array of additional HTTP headers.
- getTimeout() — Get the connection timeout used when making requests.
- hasError() — Did the previous request return an error?
- setAPIKey() — Set the API key to use when making requests.
- setApiUrl() — Set the API endpoint URL.
- setApiVersion() — Set the API version to use when making requests.
- setDebug() — Enable or disable request debugging.
- setHeaders() — Set additional HTTP headers to send when making requests.
- setTimeout() — Set the connection timeout used when making requests.