Purpose:
This function is for general purpose communications. It allows to communicate with the main server, or any other server in the network.
When sending a message (normally a command or request), the message will travel from the API’s webserver to the global app server, and then to the target establishment server, process, and go back all the way with an answer, it can round the world two times, so, don’t expect flash fast answers.
If the target server is offline, this function will wait about 15 seconds for returning the ‘ping time out’ error. And, is not guarantee in any way if the sent message reached the target or not, and just the reply was missing in the middle-man, but it is weird this worst scenario, normally if the path was good to go, sure it is good to go-back.
For criticals messages, like sending money to an account, you can test first with an _ECHO message, so if it goes good and reasonably fast, you can send the critical message.
IMPORTANT: Use HTTPS allways.
Input parameters:
- CommandClass = Command or request ClassID (string).
- Param1 = general purpose first parameter (string).
- Param2 = general purpose second parameter (string).
- Param3 = general purpose third parameter (string).
- Param4 = general purpose fourth parameter (string).
Example of usage:
https://wingamer.ar/ApiMasterControl/Comm.php?CommandClass=_ECHO&Param1=flulpycrea
Output:
- Array Object [ {“ResponseClass”: “string”, “Param1”: “string”, “Param2”: “string”, “Param3”: “string”, “Param4”: “string” }, {…another response…}, {…another response…}, … ]
- All parameters are optional, but “CommandClass” and “ResponseClass” are allways present.
This API return the control as fast as it receives a “ResponseClass” = ‘OK’, “ResponseClass” = ‘ERROR’ or “ResponseClass” = ‘ECHO’, so, one of these is the last one to receive, and anything later will be ignored. If it don’t receive one of these, it will return a ping time out error, don’t matter what.