Opensocial.NavigationParameters (v0.9)

NeedsExamples

opensocial.NavigationParameters

Parameters used by RequestShareApp to instruct the container on where to go after the request is made. It could be used, for example, to specify where viewers get routed in one of two cases: After a user gets a shareApp invitation or receives a message a gadget developer should be able to send that user to a context sensitive place. After a viewer actually shares an app with someone else the gadget developer should be able to redirect the viewer to a context sensitive place.

Methods

opensocial.NavigationParameters.getField

;String getField(key, opt_params)

Parameters
NameTypeDescription |

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
TypeDescription |

String

The data

Description
Gets the NavigationParameters' data that's associated with the specified key.

opensocial.NavigationParameters.setField

;setField(key, data)

Parameters
NameTypeDescription |

key

String

The key to set data for

data

Object

The data to set

Description
Sets data for this NavigationParameters associated with the given key.

opensocial.NavigationParameters.DestinationType

The destinations available for navigation in requestShareApp and requestSendMessage.

opensocial.NavigationParameters.DestinationType.RECIPIENT_DESTINATION

<static> Member of: opensocial.NavigationParameters.DestinationType.RECIPIENT_DESTINATION This field may be used interchangeably with the string 'recipientDestination'.

opensocial.NavigationParameters.DestinationType.VIEWER_DESTINATION

<static> Member of: opensocial.NavigationParameters.DestinationType.VIEWER_DESTINATION This field may be used interchangeably with the string 'viewerDestination'.

opensocial.NavigationParameters.Field

All of the fields that NavigationParameters can have. See also: opensocial.NavigationParameters.getField()

opensocial.NavigationParameters.Field.OWNER

<static> Member of: opensocial.NavigationParameters.Field.OWNER A string representing the owner id. This field may be used interchangeably with the string 'owner'.

opensocial.NavigationParameters.Field.PARAMETERS

<static> Member of: opensocial.NavigationParameters.Field.PARAMETERS An optional list of parameters passed to the gadget once the new view, with the new owner, has been loaded. This field may be used interchangeably with the string 'parameters'.

opensocial.NavigationParameters.Field.VIEW

<static> Member of: opensocial.NavigationParameters.Field.VIEW The gadgets.views.View to navigate to. This field may be used interchangeably with the string 'view'.

{{ JsApiAlphaList_(v0.9) }}