Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

NeedsExamples

opensocial.ResponseItem

Represents a response that was generated by processing a data request item on the server.

Methods

opensocial.ResponseItem.getData

;Object getData()

Returns
TypeDescription |

Object

The requested value calculated by the server; the type of this value is defined by the type of request that was made

Description
Gets the response data.

opensocial.ResponseItem.getErrorCode

;String getErrorCode()

Returns
TypeDescription |

String

The error code, or null if no error occurred

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.

opensocial.ResponseItem.getErrorMessage

;String getErrorMessage()

Returns
TypeDescription |

String

A human-readable description of the error that occurred; can be null, even if an error occurred

Description
If the request had an error, returns the error message.

opensocial.ResponseItem.getOriginalDataRequest

;Object getOriginalDataRequest()

Returns
TypeDescription |

Object

The request item used to fetch this data response

Description
Returns the original data request item.

opensocial.ResponseItem.hadError

;Boolean hadError()

Returns
TypeDescription |

Boolean

True if there was an error; otherwise, false

Description
Returns true if there was an error in fetching this data from the server.

opensocial.ResponseItem.Error

Error codes that a response item can return.

opensocial.ResponseItem.Error.BAD_REQUEST

<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'.

opensocial.ResponseItem.Error.FORBIDDEN

The gadget can never have access to the requested data. This field may be used interchangeably with the string 'forbidden'.

opensocial.ResponseItem.Error.INTERNAL_ERROR

<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'.

opensocial.ResponseItem.Error.LIMIT_EXCEEDED

<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'.

opensocial.ResponseItem.Error.NOT_IMPLEMENTED

<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'.

opensocial.ResponseItem.Error.UNAUTHORIZED

<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) }}

  • No labels