opensocial.Message
Method
opensocial.message.getField
String getField(key, opt_params)
Acquires data for the Message linked to the specified key.
Parameter
| Name | Type | Description |
|---|---|---|
| key | String | Key for acquiring data. Refer to the Field class for possible values. |
| opt_params | Map.<opensocial.DataRequest.DataRequestFields | Object> |
Return value
| Type | Description |
|---|---|
| String | Data |
Sample
var title = message.getField(opensocial.Message.Field.TITLE);
opensocial.Message.setField
setField(key, data)
Sets data in the Message with the specified key.
Parameter
| Name | Type | Description |
|---|---|---|
| key | String | The key to set in data |
| String | String | The data to set |
Return value
None
Sample
message.setField(opensocial.Message.Field.TITLE, "Hello!");
opensocial.Message.Field
opensocial.Message.Field.TYPE
The type of message.
opensocial.Message.Field.TITLE
The title of the message.
opensocial.Message.Field.BODY
opensocial.Message.Field.TITLE_ID
Not supported.
opensocial.Message.Field.BODY_ID
Not supported.
opensocial.Message.Type
opensocial.Message.Type.EMAIL
Not supported.
opensocial.Message.Type.NOTIFICATION
Not supported.
opensocial.Message.Type.PRIVATE_MESSAGE
Specifies MiniMail as the type.
opensocial.Message.Type.PUBLIC_MESSAGE
Not supported.
Revision History
- 12/2010
- Initial Release.