Opensocial.ResponseItem (v0.9)

From VZ Developer Wiki
Revision as of 12:20, 29 July 2010 by Seba (talk | contribs) (Created page with '{{NeedsExamples}} <div style="float:right; margin: 0 0 10px 10px;">__TOC__</div> <span style="font-size:150%"><strong>opensocial.ResponseItem</strong></span> Represents a respo…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This documentation is not completed yet and will be extended by more examples in future.

opensocial.ResponseItem

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

Methods

opensocial.ResponseItem.getData

Object getData()
Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
Object The request item used to fetch this data response
Description
Returns the original data request item.

opensocial.ResponseItem.hadError

Boolean hadError()
Returns
Type Description
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'.



OpenSocial (v0.9)

gadgets

gadgets.io

gadgets.json

gadgets.Prefs

gadgets.util

gadgets.views

gadgets.flash

gadgets.MiniMessage

gadgets.oauth.Popup

gadgets.rpc

gadgets.skins

gadgets.pubsub

gadgets.Tab

gadgets.TabSet

gadgets.window

gadgets.i18n

opensocial

opensocial.Activity

opensocial.Address

opensocial.Album

opensocial.BodyType

opensocial.Collection

opensocial.CreateActivityPriority

opensocial.DataRequest

opensocial.DataResponse

opensocial.Email

opensocial.Enum

opensocial.Environment

opensocial.EscapeType

opensocial.IdSpec

opensocial.MediaItem

opensocial.Message

opensocial.MessageCollection

opensocial.Name

opensocial.NavigationParameters

opensocial.Organization

opensocial.Permission

opensocial.Person

opensocial.Phone

opensocial.ResponseItem

opensocial.Url

osapi.Request

osapi.BatchRequest

osapi.people

osapi.activities

osapi.appdata

osapi.messages

osapi.http