Table of contents
- 1. Methods
Wraps Gigya server's response.
Methods
| Method | Description | |
| GSObject | GetData() | 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). We only parse response text into a GSObject if the request format is "json" which is the default. |
| int | GetErrorCode() | 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. |
| string | GetErrorMessage() | Returns a short textual description of the response error, for logging purposes. |
| static string | GetErrorMessage( int errorCode) | Returns the textual description, associated with the input errorCode. |
| string | GetLog() | Returns a log of the operation for debugging purpose. The format of the log is: apiMethod=getUserInfo apiKey=2_Y82PzwJ_chSFImHXaIDJClnLyJzmk-VFOa params={"format":"json","uid":"_gid_cZmpLPCjVNRUnm2TH1cwn"} URL=http://socialize.gigya.com/socialize.getUserInfo postData=apiKey=2_Y82PzwJ_chSFImHXaIDJClnLyJzmk-VFOa&format=json&nonce=1286812741402&sig=ncffaV3MuuVjTQedxpDF&timestamp=1286812741&uid=_gid_cZmpLPCjVNRUnm2TH1cwn server=web508 response={ "errorCode": 403005, "errorMessage": "Unauthorized user", "statusCode": 403, "statusReason": "Forbidden", "callId": "d8b041336e354a789553830705203779" } |
| 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. |
| int | GetInt(string key, int defaultValue) | Methods for retrieving value by key. For the methods without defaultValue, the method throws GSKeyNotFoundException, if the key is not found. |
| long | GetLong(string key, long defaultValue) | |
| bool | GetBool(string key, bool defaultValue) | |
| string | GetString(string key, string defaultValue) | |
| GSObject | GetObject(string key, GSObject defaultValue) | |
| GSArray | GetArray(string key, GSArray defaultValue) | |
| IEnumerable<T> | Get<T>(string path, bool attempt_conversion = false) | The method retreives a list of objects/values which match the path parameter and whose type matches the template parameter <T>. Parameters:
Note: if the response contains a null value and you request a non-nullable data type (bool, int, etc) then that response value will be ignored. If you do request a nullable or class type (int?, GSObject, etc) then a null object will be returned. |
| string | ToString() | Returns a string representation of the response. |

Comments