Opensocial.Message (v0.9)

From VZ Developer Wiki
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.TYPE

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

opensocial.Message.Field.TITLE

This field may be used interchangeably with the string 'title'.

opensocial.Message.Field.BODY

This field may be used interchangeably with the string 'body'.

opensocial.Message.Field.OPT_PARAMS

Optional parameters which will be added to the link to the app. This field may be used interchangeably with the string 'opt_params'.

opensocial.Message.Type

opensocial.Message.Type.NOTIFICATION

A short private message. This field may be used interchangeably with the string 'notification'.
Quota
For the Message Type opensocial.Message.Type.NOTIFICATION the following quota is enforced on production
  • To one user you can only send three notifications a day
  • The message yon send to an user hast to be different from the notification message you send before

opensocial.Message.Type.PRIVATE_MESSAGE

A message to a specific user that can be seen only by that user. This field may be used interchangeably with the string 'privateMessage'.

opensocial.Message.Type.PUBLIC_MESSAGE

A message to a specific user that can be seen by more than that user. This field may be used interchangeably with the string 'publicMessage'. At VZ-Netzwerke these messages are posted to the wall of the recipient's profile page. Not that in a public message the title is omitted.



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