opensocial.Message
メソッド
opensocial.message.getField
String getField(key, opt_params)
指定したキーに関連づけされた Message のデータを取得します。
パラメータ
| 名前 | 型 | 説明 |
|---|---|---|
| key | String | データを取得するためのキー。可能な値はFieldクラスを参照。 |
| opt_params | Map.<opensocial.DataRequest.DataRequestFields | Object> |
返り値
| 型 | 説明 |
|---|---|
| String | データ |
サンプル
var title = message.getField(opensocial.Message.Field.TITLE);
opensocial.Message.setField
setField(key, data)
指定されたキーで Message にデータを設定します。
パラメータ
| 名前 | 型 | 説明 |
|---|---|---|
| key | String | データに設定するキー |
| String | String | 設定するデータ |
返り値
なし
サンプル
message.setField(opensocial.Message.Field.TITLE, "Hello!");
opensocial.Message.Field
opensocial.Message.Field.TYPE
メッセージのタイプです。
opensocial.Message.Field.TITLE
メッセージのタイトルです。
opensocial.Message.Field.BODY
opensocial.Message.Field.TITLE_ID
サポートされていません。
opensocial.Message.Field.BODY_ID
サポートされていません。
opensocial.Message.Type
opensocial.Message.Type.EMAIL
サポートされていません。
opensocial.Message.Type.NOTIFICATION
サポートされていません。
opensocial.Message.Type.PRIVATE_MESSAGE
タイプとしてミニメを指定します。
opensocial.Message.Type.PUBLIC_MESSAGE
サポートされていません。
更新履歴
- 2013/03/15
- ドキュメント移行