getVersion
getVersion()
The
getVersion
method returns the version of the current implementation of the
Interact
runtime server.
Best practice is to use this method when you initialize the touchpoint with the
Interact
API.
Return value
The runtime server responds to the
getVersion
with a Response object with the following attributes populated:
AdvisoryMessages
ApiVersion
StatusCode
Example
This example shows a simple way to call
getVersion
and process the results.
response = api.getVersion();
/** Process the response appropriately */
// check if response is successful or not
if(response.getStatusCode() == Response.STATUS_SUCCESS)
{
System.out.println("getVersion call processed with no warnings or errors");
System.out.println("API Version:" + response.getApiVersion(););
}
else if(response.getStatusCode() == Response.STATUS_WARNING)
{
System.out.println("getVersion call processed with a warning");
}
else
{
System.out.println("getVersion call processed with an error");
}
// For any non-successes, there should be advisory messages explaining why
if(response.getStatusCode() != Response.STATUS_SUCCESS)
printDetailMessageOfWarningOrError("getVersion",
response.getAdvisoryMessages());
Copyright IBM Corporation 2012. All Rights Reserved.