Opensocial (v0.9)

Opensocial (v0.9)

NeedsExamples

opensocial

Namespace for top-level people functions.

Methods

opensocial.getEnvironment

;<static> opensocial.Environment opensocial.getEnvironment()

Returns
TypeDescription |

Description
Gets the current environment for this gadget. You can use the environment to make queries such as what profile fields and surfaces are supported by this container, what parameters were passed to the current gadget, and so on.

opensocial.hasPermission

;<static> Boolean opensocial.hasPermission(permission)

Parameters
NameTypeDescription |

Returns
TypeDescription |

Description
Returns true if the current gadget has access to the specified permission. If the gadget calls opensocial.requestPermission and permissions are granted then this function must return true on all subsequent calls.

opensocial.invalidateCache

;<static> opensocial.invalidateCache()

Description
Invalidates all resources cached for the current viewer.

opensocial.newActivity

;<static> opensocial.Activity opensocial.newActivity(params)

Parameters
NameTypeDescription |

Returns
TypeDescription |

Description
Creates an activity object, which represents an activity on the server. See also: requestCreateActivity(), It is only required to set one of TITLE_ID or TITLE. In addition, if you are using any variables in your title or title template, you must set TEMPLATE_PARAMS. Other possible fields to set are: URL, MEDIA_ITEMS, BODY_ID, BODY, EXTERNAL_ID, PRIORITY, STREAM_TITLE, STREAM_URL, STREAM_SOURCE_URL, and STREAM_FAVICON_URL. Containers are only required to use TITLE_ID or TITLE, and may choose to ignore additional parameters. See Field for more details.

opensocial.newAlbum

;<static> opensocial.MediaItem opensocial.newAlbum(opt_params)

Parameters
NameTypeDescription |

Returns
TypeDescription |

Description
Creates a album. Represents a collection of images, movies, and audio. Used when creating albums on the server.

opensocial.newDataRequest

;<static> opensocial.DataRequest opensocial.newDataRequest()

Returns
TypeDescription |

Description
Creates a data request object to use for sending and fetching data from the server.

opensocial.newIdSpec

;<static> opensocial.IdSpec opensocial.newIdSpec(parameters)

Parameters
NameTypeDescription |

Returns
TypeDescription |