Symcon JSON API wrapper class.
More...
|
| get_ips_vartypes () |
| return $ips_vartypes
|
|
| __construct (string $url, string $user, string $password, bool $exception_flag=false) |
| Constructor.
|
|
| getErrorMessage () |
| retrieves last error message
|
|
| getMethod () |
| retrieves last called method
|
|
| isError () |
| check if an error occured
|
|
| get_var (int $id) |
| retrieves IPS Variable details
|
|
| get_script (int $id) |
| get script details
|
|
| __call (string $name, mixed $arguments) |
| main function (class autoloader)
|
|
|
string | $url |
| URL to reach Symcon.
|
|
string | $user |
| API Username (Lizenz-Benutzername e.g.
|
|
string | $password |
| API Password (remote access = Fernzugriff Kennwort)
|
|
string | $method |
| last called method
|
|
bool | $exception_flag |
| should throw an Exception in case of error
|
|
Symcon JSON API wrapper class.
- Exceptions
-
Exception | (disabled by default) |
- Version
- 7.0
- Date
- 2024-01-24
Descriptions :
- See also
- https://www.tdressler.net/ipsymcon/jsonapi.html
-
https://www.symcon.de/service/dokumentation/entwicklerbereich/datenaustausch/
-
https://www.symcon.de/service/dokumentation/komponenten/verwaltungskonsole/
// ips methods used in this class via _call (to make ide happy) @method IPS_GetObject(int $id) @method IPS_VariableExists(int $id) @method IPS_GetVariable(int $id) @method IPS_GetVariableProfile($profilename) @method GetValue(int $id) @method IPS_ScriptExists(int $id) @method IPS_GetScript(int $id) @method IPS_RunScriptWait(int $script_id) @method IPS_GetKernelVersion() @method IPS_InstanceExists(int $id) @method IPS_GetInstance(int $id) @method FS20_SwitchMode(int $id, bool $switch)
- Examples
- check_ips_json.php.
◆ __construct()
__construct |
( |
string |
$url, |
|
|
string |
$user, |
|
|
string |
$password, |
|
|
bool |
$exception_flag = false |
|
) |
| |
Constructor.
- Parameters
-
string | $url | full url to reach ipsymcon json api service |
string | $user | IPSymcon License Username (e.g. Email) |
string | $password | IPSymcon "Fernzugriff/Remote Access"-Password |
boolean | $exception_flag | indicates if aan exception should occur |
- Exceptions
-
◆ __call()
__call |
( |
string |
$name, |
|
|
mixed |
$arguments |
|
) |
| |
main function (class autoloader)
called if a method with a given name doesn't exist will catch method name and translate into api call
- Parameters
-
string | $name | method |
mixed | $arguments | |
- Returns
- mixed result of called function
- Exceptions
-
◆ get_ips_vartypes()
return $ips_vartypes
- Returns
- array
◆ get_object_name()
get_object_name |
( |
int |
$id | ) |
|
|
private |
retrieves name of object
- Parameters
-
- Returns
- string
◆ get_script()
get script details
- Parameters
-
- Returns
- ?array Assoc Array mit Last Execution Time(last), ScriptName(name), FileName(file), Broken(is_broken)
◆ get_var()
retrieves IPS Variable details
- Parameters
-
- Returns
- ?array Assoc Array mit Value(value), Type(type), Name(name),Last Update(last), Suffix(suffix),Digits(digits) vom Profile
◆ getErrorMessage()
retrieves last error message
- Returns
- string
◆ getMethod()
retrieves last called method
- Returns
- string
◆ isError()
check if an error occured
- Returns
- bool
◆ setError()
setError |
( |
string |
$message | ) |
|
|
private |
set error variable
- Parameters
-
string | $message | Error Message |
◆ $exception_flag
array of String $exception_flag |
|
private |
should throw an Exception in case of error
IPS Variable Types.
matches IPS Variable API type return codes to API type field names ("ValueXYZ")
◆ $password
array of string $password |
|
private |
API Password (remote access = Fernzugriff Kennwort)
last Error
$error=array('message'=>$message,'code'=>$code)
- Parameters
-
◆ $user
The documentation for this class was generated from the following file:
- C:/local/progs/ipsymcon/phpmodule/ipsymcon-phpmodule-by-Tommi/libs/Api/IPS_JSON.php