IPSymcon JSON API Wrapper  4.4 (IPS V4.4)
Public Member Functions | Private Member Functions | Private Attributes
IPS_JSON Class Reference

IPSymcon JSON API wrapper class. More...

Public Member Functions

 get_ips_vartypes ()
 return $ips_vartypes More...
 
 __construct ($url, $user, $password, $exception_flag=false)
 Constructor. More...
 
 getErrorMessage ()
 retrieves last error message More...
 
 getErrorCode ()
 retrieves last error code More...
 
 getMethod ()
 retrieves last called method More...
 
 isError ()
 check if an error occured More...
 
 get_var ($id)
 retrieves IPS Variable details More...
 
 get_script ($id)
 get script details More...
 
 __call ($name, $arguments)
 main function (class autoloader) More...
 

Private Member Functions

 setError ($message, $code)
 set error variable More...
 

Private Attributes

 $url
 URL to reach IPSymcon.
 
 $user
 API Username (Lizenz-Benutzername e.g. More...
 
 $password
 API Password (Fernzugriff Kennword) More...
 
 $method
 last called method
 
 $exception_flag
 should throw an Exception in case of error More...
 

Detailed Description

IPSymcon JSON API wrapper class.

Exceptions
Exception(disabled by default)
Version
4.1
Date
2016-05-11

Descriptions :

See also
http://www.tdressler.net/ipsymcon/jsonapi.html
http://www.ip-symcon.de/service/dokumentation/entwicklerbereich/datenaustausch/
http://www.ip-symcon.de/service/dokumentation/komponenten/verwaltungskonsole/
Examples:
check_ips_json.php, and run_ips_script.php.

Constructor & Destructor Documentation

__construct (   $url,
  $user,
  $password,
  $exception_flag = false 
)

Constructor.

Parameters
string$urlfull url to reach ipsymcon json api service
string$userIPSymcon License Username (e.g. Email)
string$passwordIPSymcon "Fernzugriff/Remote Access"-Password
boolean$exception_flagindicates if aan exception should occur
Exceptions
Exception

Member Function Documentation

__call (   $name,
  $arguments 
)

main function (class autoloader)

called if a method with a given name doesnt exist will catch method name and translate into api call

Parameters
string$namemethod
variant$arguments
Returns
variant result of called function
Exceptions
Exception
get_ips_vartypes ( )

return $ips_vartypes

Returns
array
get_script (   $id)

get script details

Parameters
int$idIPS Script-ID
Returns
array Assoc Array mit Last Execution Time(last), ScriptName(name), FileName(file), Broken(is_broken)
get_var (   $id)

retrieves IPS Variable details

Parameters
int$idIPS Variable-ID
Returns
array Assoc Array mit Value(value), Type(type), Name(name),Last Update(last), Suffix(suffix),Digits(digits) vom Profile
getErrorCode ( )

retrieves last error code

Returns
integer
getErrorMessage ( )

retrieves last error message

Returns
string
getMethod ( )

retrieves last called method

Returns
String
isError ( )

check if an error occured

Returns
bool
setError (   $message,
  $code 
)
private

set error variable

Parameters
String$messageError Message
int$codeError Code

Field Documentation

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")

array of String $password
private

API Password (Fernzugriff Kennword)

last Error

$error=array('message'=>$message,'code'=>$code)

Parameters
String$message
Integer$code
String $user
private

API Username (Lizenz-Benutzername e.g.

Email)

See also
http://www.ip-symcon.de/service/dokumentation/komponenten/verwaltungskonsole/

The documentation for this class was generated from the following file: