Class opensocial.ResponseItem
Represents a response that was generated
by processing a data request item on the server.
Defined in: opensocial.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
| Method Attributes | Method Name and Description |
|---|---|
|
getData()
Gets the response data.
|
|
|
If the request had an error, returns the error code.
|
|
|
If the request had an error, returns the error message.
|
|
|
Returns the original data request.
|
|
|
hadError()
Returns true if there was an error in fetching this data from the server.
|
Method Detail
{Object}
getData()
Gets the response data.
- Returns:
- {Object} The requested value calculated by the server; the type of this value is defined by the type of request that was made
{String}
getErrorCode()
If the request had an error, returns the error code.
The error code can be container-specific
or one of the values defined by
Error.
- Returns:
- {String} The error code, or null if no error occurred
{String}
getErrorMessage()
If the request had an error, returns the error message.
- Returns:
- {String} A human-readable description of the error that occurred; can be null, even if an error occurred
{opensocial.DataRequest}
getOriginalDataRequest()
Returns the original data request.
- Returns:
- {opensocial.DataRequest} The data request used to fetch this data response
{Boolean}
hadError()
Returns true if there was an error in fetching this data from the server.
- Returns:
- {Boolean} True if there was an error; otherwise, false