Opensocial.Message (v0.9)

From VZ Developer Wiki
Revision as of 12:17, 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.Message</strong></span> Base interface for all …')
(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.Message

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

Methods

opensocial.Message.getField

String getField(key, opt_params)
Parameters
Name Type Description
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
Type Description
String The data
Description
Gets the message data that's associated with the specified key.

opensocial.Message.setField

setField(key, data)
Parameters
Name Type Description
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'.



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