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

Base interface for all message objects. * See also: opensocial.newMessage(), opensocial.requestSendMessage()

Methods

opensocial.Message.getField

;String getField(key, opt_params)

Parameters
NameTypeDescription |

key

String

The key to get data for; see the Field class for possible values

opt_params

Map.<opensocial.DataRequest.DataRequestFields

Object>

Additional params to pass to the request.

Returns
TypeDescription |

String

The data

Description
Gets the message data that's associated with the specified key.

opensocial.Message.setField

;setField(key, data)

Parameters
NameTypeDescription |

key

String

The key to set data for

data

String

The data to set

Description
Sets data for this message associated with the given key.

opensocial.Message.Field

All of the fields that messages can have. See also: opensocial.Message.getField()

opensocial.Message.Field.APP_URL

Identifies the application that generated this message. This field may be used interchangeably with the string 'appUrl'.

opensocial.Message.Field.BODY

The main text of the message. HTML attributes are allowed and are sanitized by the container. This field may be used interchangeably with the string 'body'.

opensocial.Message.Field.BODY_ID

The main text of the message as a message template. Specifies the message ID to use in the gadget xml. This field may be used interchangeably with the string 'bodyId'.

opensocial.Message.Field.COLLECTION_IDS

Identifies the messages collection IDs this message is contained in. This field may be used interchangeably with the string 'collectionIds'.

opensocial.Message.Field.ID

unique ID for this message. This field may be used interchangeably with the string 'id'.

opensocial.Message.Field.IN_REPLY_TO

Message ID, use for threaded comments/messages. Reference the sematics of the Atom Threading model defined in rfc4685. URLs should be mapped to Atom <link rel="type" .../> This field may be used interchangeably with the string 'inReplyTo'.

opensocial.Message.Field.RECIPIENTS

Array of person IDs. This field may be used interchangeably with the string 'recipients'.

opensocial.Message.Field.REPLIES

array of message ids. Reference the sematics of the Atom Threading model defined in rfc4685. URLs should be mapped to Atom <link rel="type" .../> This field may be used interchangeably with the string 'replies'.

opensocial.Message.Field.SENDER_ID

id of person who sent the message. This field may be used interchangeably with the string 'senderId'.

opensocial.Message.Field.STATUS

Status of the message. (NEW, READ, DELETED). This field may be used interchangeably with the string 'status'.

opensocial.Message.Field.TIME_SENT

UTC time message was sent. This field may be used interchangeably with the string 'timeSent'.

opensocial.Message.Field.TITLE

The title of the message. HTML attributes are allowed and are sanitized by the container. This field may be used interchangeably with the string 'title'.

opensocial.Message.Field.TITLE_ID

The title of the message as a message template. Specifies the message ID to use in the gadget xml. This field may be used interchangeably with the string 'titleId'.

opensocial.Message.Field.TYPE

The title of the message, specified as an opensocial.Message.Type. This field may be used interchangeably with the string 'type'.

opensocial.Message.Field.UPDATED

last update for this message . This field may be used interchangeably with the string 'updated'.

opensocial.Message.Field.URLS

List of related URLs for this message. Supported URL types include 'alternate', alternate for for this mailbox (text/html being the most common). This field may be used interchangeably with the string 'urls'.

{{ JsApiAlphaList_(v0.9) }}

  • No labels