Class GSResponse Python

Skip to end of metadata
Go to start of metadata

Description

Wraps Gigya server's response.

 

Method Summary

Method Description
JSON objectgetData()Returns the response data. Please refer to the REST API reference, for a list of response data structure per method request.
Note: If the request was sent with the format parameter set to "xml", the getData() will return null and you should use getResponseText() method instead (see below).
integergetErrorCode()Returns the result code of the operation. Code '0' indicates success, any other number indicates failure. For complete list of server error codes, see the Error Codes table. 
stringgetErrorMessage()Returns a short textual description of an error, associated with the errorCode, for logging purposes.
stringgetLog()Returns a log of the operation for debugging purpose. The format of the log is:

apiMethod=chat.getMessages,
apiKey=2_DJDxNTrvx_QC313MDs_6Byos-ua1lHs5S1-fH32d-MznZn-gLccOid6IYt1D2f26,
params={'httpStatusCodes': 'false', 'format': 'json', 'UID': '_gid_Byg78TU2dp47WiImn7t3UA==', 'categoryID': '44474105'},
baseString=POST&http%3A%2F%2Fchat.gigya.com%2Fchat.getMessages&UID%3D_gid_Byg78TU2dp47WiImn7t3UA%253D%253D%26apiKey%3D2_
DJDxNTrvx_QC313MDs_6Byos-ua1lHs5S1-fH32d-MznZn-gLccOid6IYt1D2f26%26categoryID%3D44474105%26format%3Djson%26httpStatusCodes
%3Dfalse%26nonce%3D1369740195612486%26timestamp%3D1369740195,
URL=http://chat.gigya.com/chat.getMessages,
postData=nonce=1369740195612486&httpStatusCodes=false&UID=_gid_Byg78TU2dp47WiImn7t3UA%3D%3D&format=json×tamp=1369740195
&apiKey=2_DJDxNTrvx_QC313MDs_6Byos-ua1lHs5S1-fH32d-MznZn-gLccOid6IYt1D2f26&sig=DMDsauUzETP5mFpaZ9Q6ndxp%2BIU%3D&categoryID=44474105,
responseText={
    "next":1369740288341,
    "publicMessages":[],
    "privateMessages":[],
    "callId":"18b8599538064f93ac862aa9cdc93749",
    "errorCode":0,
    "errorMessage":""
}
string getResponseText()The raw response data. The raw response data is in JSON format, by default. If the request was sent with the format parameter set to "xml", the raw response data will be in XML format.
JSON objectgetObject(string key)Type specific methods for retrieving value by key. If the key is not found, and there is no default value, the method throws GSKeyNotFoundException.