Opensocial.IdSpec (v0.9)

From VZ Developer Wiki
Revision as of 12:17, 29 July 2010 by Seba (talk | contribs) (Created page with '{{NeedsExamples}} <div style="float:right; margin: 0 0 10px 10px;">__TOC__</div> <span style="font-size:150%"><strong>opensocial.IdSpec</strong></span> Base interface for all i…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This documentation is not completed yet and will be extended by more examples in future.

opensocial.IdSpec

Base interface for all id spec objects.

Methods

opensocial.IdSpec.getField

String getField(key, opt_params)
Parameters
Name Type Description
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
Type Description
String The data
Description
Gets the id spec's data that's associated with the specified key.

opensocial.IdSpec.setField

setField(key, data)
Parameters
Name Type Description
key String The key to set data for
data String The data to set
Description
Sets data for this id spec associated with the given key.

opensocial.IdSpec.Field

All of the fields that id specs can have. See also: opensocial.IdSpec.getField()

opensocial.IdSpec.Field.GROUP_ID

A string representing the group id or one of the opensocial.IdSpec.GroupId values. Defaults to SELF. This field may be used interchangeably with the string 'groupId'.

opensocial.IdSpec.Field.NETWORK_DISTANCE

<static> Member of: opensocial.IdSpec.Field.NETWORK_DISTANCE An optional numeric parameter, used to specify how many "hops" are allowed between two people still considered part of the same group. This is 0 based, for example: A value of 0 means that the people are the same person. 1 would mean that the people were friends. And 2 would mean that there was a friend of a friend relationship. Defaults to 1 (they are both friends or directly in the same group). Not all containers will support networkDistances greater than 1. This field may be used interchangeably with the string 'networkDistance'.

opensocial.IdSpec.Field.USER_ID

A string or an array of strings representing the user id. Can be one of the opensocial.IdSpec.PersonId values. This field may be used interchangeably with the string 'userId'.

opensocial.IdSpec.GroupId

Constant group IDs available when fetching collections of people.

opensocial.IdSpec.GroupId.ALL

This field may be used interchangeably with the string 'ALL'.

opensocial.IdSpec.GroupId.FRIENDS

This field may be used interchangeably with the string 'FRIENDS'.

opensocial.IdSpec.GroupId.SELF

This field may be used interchangeably with the string 'SELF'.

opensocial.IdSpec.PersonId

Constant person IDs available when fetching person information.

opensocial.IdSpec.PersonId.OWNER

This field may be used interchangeably with the string 'OWNER'.

opensocial.IdSpec.PersonId.VIEWER

This field may be used interchangeably with the string 'VIEWER'.



OpenSocial (v0.9)

gadgets

gadgets.io

gadgets.json

gadgets.Prefs

gadgets.util

gadgets.views

gadgets.flash

gadgets.MiniMessage

gadgets.oauth.Popup

gadgets.rpc

gadgets.skins

gadgets.pubsub

gadgets.Tab

gadgets.TabSet

gadgets.window

gadgets.i18n

opensocial

opensocial.Activity

opensocial.Address

opensocial.Album

opensocial.BodyType

opensocial.Collection

opensocial.CreateActivityPriority

opensocial.DataRequest

opensocial.DataResponse

opensocial.Email

opensocial.Enum

opensocial.Environment

opensocial.EscapeType

opensocial.IdSpec

opensocial.MediaItem

opensocial.Message

opensocial.MessageCollection

opensocial.Name

opensocial.NavigationParameters

opensocial.Organization

opensocial.Permission

opensocial.Person

opensocial.Phone

opensocial.ResponseItem

opensocial.Url

osapi.Request

osapi.BatchRequest

osapi.people

osapi.activities

osapi.appdata

osapi.messages

osapi.http