Common methods

These are general-purpose methods:

ping

ping(string: <string>) -> {pong: string}

Use it to test the connections. There is, basically, no need to ping the connection to keep it alive unless specified in the connection endpoint.

version

version() -> {version: <string>, api_level: <int>, min_api_level: <int> }

Additional to the well-known version string, this call returns 2 numbers that are of importance to the application programmer:

  • api_level: current api level, the number that grows every time the API suffers significant change. When it is greater than one the application expects, it is time to consult the docs and see what has been changed and might needed to be updated in the applicaiton code.

  • min_api_level: the minumum api level which is generally compatible with current state of the API.

While we will do our best to make API as backward compatible as possible, with time some things may require incompatible changes, so the application detected the min_api_level being above its expectation should ask user to updgrade immediately.