Opensocial.IdSpec (v0.9)

NeedsExamples

opensocial.IdSpec

Base interface for all id spec objects.

Methods

opensocial.IdSpec.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 id spec's data that's associated with the specified key.

opensocial.IdSpec.setField

;setField(key, data)

Parameters
NameTypeDescription |

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'.

{{ JsApiAlphaList_(v0.9) }}