NeedsExamples
opensocial.ResponseItem
Represents a response that was generated by processing a data request item on the server.
;Object getData()
Returns
TypeDescription |
|
Description
Gets the response data.
;String getErrorCode()
Returns
TypeDescription |
|
Description
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.
;String getErrorMessage()
Returns
TypeDescription |
|
Description
If the request had an error, returns the error message.
;Object getOriginalDataRequest()
Returns
TypeDescription |
|
Description
Returns the original data request item.
;Boolean hadError()
Returns
TypeDescription |
|
Description
Returns true if there was an error in fetching this data from the server.
Error codes that a response item can return.
<static> Member of: opensocial.ResponseItem.Error.BAD_REQUEST The request was invalid. Example: 'max' was -1. This field may be used interchangeably with the string 'badRequest'.
The gadget can never have access to the requested data. This field may be used interchangeably with the string 'forbidden'.
<static> Member of: opensocial.ResponseItem.Error.INTERNAL_ERROR The request encountered an unexpected condition that prevented it from fulfilling the request. This field may be used interchangeably with the string 'internalError'.
<static> Member of: opensocial.ResponseItem.Error.LIMIT_EXCEEDED The gadget exceeded a quota on the request. Example quotas include a max number of calls per day, calls per user per day, calls within a certain time period and so forth. This field may be used interchangeably with the string 'limitExceeded'.
<static> Member of: opensocial.ResponseItem.Error.NOT_IMPLEMENTED This container does not support the request that was made. This field may be used interchangeably with the string 'notImplemented'.
<static> Member of: opensocial.ResponseItem.Error.UNAUTHORIZED The gadget does not have access to the requested data. To get access, use opensocial.requestPermission(). This field may be used interchangeably with the string 'unauthorized'.
{{ JsApiAlphaList_(v0.9) }}