opensocial
- Method
- opensocial.requestSendMessage
- opensocial.requestShareApp
- opensocial.requestCreateActivity
- opensocial.hasPermission
- opensocial.requestPermission
- opensocial.getEnvironment
- opensocial.newDataRequest
- opensocial.newActivity
- opensocial.newMediaItem
- opensocial.newMessage
- opensocial.newIdSpec
- opensocial.newNavigationParameters
Method
opensocial.requestSendMessage
Makes a request for a message to be sent to the specified user.
Parameters
Name |
Type |
Description |
---|---|---|
recipients |
String |
Refer to the group or User ID of the receiver. Only the OWNER key is supported. |
message |
opensocial.Message |
Message object sent to the specified user |
opt_callback |
Function |
The callback function that is called when the request is complete |
opt_params |
opensocial.NavigationParameters |
The parameters that indicate the location the user is moved to when requested, or when a request is accepted |
Return value
None
Sample
opensocial.requestShareApp
Makes a request for this application to be shared with the specified user.
Parameters
Name |
Type |
Description |
---|---|---|
recipients |
String |
Only VIEWER_FRIENDS can be specified |
reason |
null |
null |
opt_callback |
Function |
The callback function that is called when the request is complete |
Return Value
None
Sample
opensocial.requestCreateActivity
Makes a request to create the specified activity without waiting for the operation to be completed.
Parameters
Name |
Type |
Description |
---|---|---|
activity |
opensocial.Activity |
Activity object to be created |
priority |
opensocial.CreateActivityPriority |
Request Priority |
opt_callback |
Function |
The callback function that is called when the request is complete |
Return Value
None
Sample
opensocial.hasPermission
Not supported
opensocial.requestPermission
Not supported
opensocial.getEnvironment
Not supported
opensocial.newDataRequest
Create a DataRequest object
Parameters
None
Return Value
Type |
Description |
---|---|
opensocial.DataRequest |
New DataRequest Object |
Sample
opensocial.newActivity
Creates an Activity object
Parameters
Name |
Type |
Description |
---|---|---|
params |
Map.<opensocial.Activity.Field/Object> |
Other fields that must be set as the Activity object. opensocial.Activity.Field.TITLE can be specified. |
Return Value
Type |
Description |
---|---|
opensocial.Activity |
Activity object |
Sample
opensocial.newMediaItem
Creates a MediaItem object
Parameters
Name |
Type |
Description |
---|---|---|
mime_type |
String |
Media MIME type |
url |
String |
Media URL |
opt_params |
Map.<opensocial.MediaItem.Field/Object> |
Other fields that must be set as the MediaItem object |
Return Value
Type |
Description |
---|---|
opensocial.MediaItem |
MediaItem object |
Sample
opensocial.newMessage
Description
Create a Message object
Parameters
Name |
Type |
Description |
---|---|---|
body |
String |
Main text of the message |
opt_params |
Map. |
Other fields that must be set as the Message object |
Return Value
Type |
Description |
---|---|
opensocial.Message |
Message object |
Sample
opensocial.newIdSpec
Description
Create an IdSpec object
Parameters
Name |
Type |
Description |
---|---|---|
patameters |
Map.<opensocial.IdSpec.Field/Object> |
Other fields that must be set as the IdSpec object |
Return Value
Type |
Description |
---|---|
opensocial.IdSpec |
IdSpec object |
Sample
opensocial.newNavigationParameters
Not supported
Revision History
- 01/24/2011
- Modified the opensocial.requestSendMessage sample.
- 12/2010
- Initial Release.