Welcome Developers!

Welcome!

Return to Developer Documentation.

Library: opensocialreference001.v07.js
Overview
Interface for containers of people functionality.
  • source: opensocialreference001.v07.js
Constructors
opensocial.Activity()

Representation of an activity.

Note: Activities are currently not supported by MySpace.

Activities are rendered with a title and an optional activity body.

You may set the title and body directly as strings when calling opensocial.createActivity.

However, it is usually beneficial to create activities using Activity Templates for the title and body. Activity Templates support:

  • Internationalization
  • Replacement variables in the message
  • Activity Summaries, which are message variations used to summarize repeated activities that share something in common.

Activity Templates are defined as messages in the gadget specification. To define messages, you create and reference message bundle XML files for each locale you support.

Example module spec in gadget XML:

<ModulePrefs title="ListenToThis">
<Locale messages="http://www.listentostuff.com/messages.xml"/>
<Locale lang="de" messages="http://www.listentostuff.com/messages-DE.xml"/>
</ModulePrefs>

 

Example message bundle:

<messagebundle>
<msg name="LISTEN_TO_THIS_SONG">
${Subject.DisplayName} told ${Owner.DisplayName} to
listen to a song!
</msg>
</messagebundle>

 

You can set custom key/value string pairs when posting an activity. These values will be used for variable substitution in the templates.

Example JS call:

  var owner = ...;
var viewer = ...;
var activity = opensocial.newActivity('LISTEN_TO_THIS_SONG',
{Song: 'Do That There - (Young Einstein hoo-hoo mix)',
Artist: 'Lyrics Born', Subject: viewer, Owner: owner})

 

Associated message:

<msg name="LISTEN_TO_THIS_SONG">
${Subject.DisplayName} told ${Owner.DisplayName} to listen
to ${Song} by ${Artist}
</msg>

 

People can also be set as values in key/value pairs when posting an activity. You can then reference the following fields on a person:

  • ${Person.DisplayName} The person's name
  • ${Person.Id} The user ID of the person
  • ${Person.ProfileUrl} The profile URL of the person
  • ${Person} This will show the display name, but containers may optionally provide special formatting, such as showing the name as a link

Users will have many activities in their activity streams, and containers will not show every activity that is visible to a user. To help display large numbers of activities, containers will summarize a list of activities from a given source to a single entry.

You can provide Activity Summaries to customize the text shown when multiple activities are summarized. If no customization is provided, a container may ignore your activities altogether or provide default text such as "Bob changed his status message + 20 other events like this."

  • Activity Summaries will always summarize around a specific key in a key/value pair. This is so that the summary can say something concrete (this is clearer in the example below).
  • Other variables will have synthetic "Count" variables created with the total number of items summarized.
  • Message ID of the summary is the message ID of the main template + ":" + the data key

Example summaries:

<messagebundle>
<msg name="LISTEN_TO_THIS_SONG:Artist">
${Subject.Count} of your friends have suggested listening to songs
by ${Artist}!
</msg>
<msg name="LISTEN_TO_THIS_SONG:Song">
${Subject.Count} of your friends have suggested listening to ${Song}
!</msg>
<msg name="LISTEN_TO_THIS_SONG:Subject">
${Subject.DisplayName} has recommended ${Song.Count} songs to you.
</msg>
</messagebundle>

 

Activity Templates may only have the following HTML tags: <b>, <i>, <a>, <span>. The container also has the option to strip out these tags when rendering the activity.

See also: opensocial.newActivity(), opensocial.requestCreateActivity()

methods
opensocial.Activity.MediaItem()
A media item associated with an activity. Represents images, movies, and audio. Create a MediaItem object using the opensocial.newActivityMediaItem() method.
methods
opensocial.Address()
Base interface for all address objects.
methods
opensocial.BodyType()
Base interface for all body type objects.
methods
opensocial.Collection()
Collection of multiple objects with useful accessors. May also represent subset of a larger collection (for example, page 1 of 10) and contain information about the larger collection.
methods
opensocial.DataRequest()

Used to request social information from the container. This includes data for friends, profiles, app data, and activities. All apps that require access to people information should send a DataRequest.

Here's an example of creating, initializing, sending, and handling the results of a data request:

function requestMe() {
var req = opensocial.newDataRequest();
req.add(req.newFetchPersonRequest(
opensocial.DataRequest.PersonId.VIEWER),
"viewer");
req.send(handleRequestMe);
};

function handleRequestMe(data) {
var viewer = data.get("viewer");
if (viewer.hadError()) {
//Handle error using viewer.getError()...
return;
}

//No error. Do something with viewer.getData()...
}

See also: opensocial.newDataRequest()

methods
  • add(request, opt_key)
opensocial.DataResponse()
This object contains the requested server data mapped to the requested keys.

See also: DataRequest

opensocial.Email()
Base interface for all email objects.
methods
Base interface for all enum objects. This class allows containers to use constants for fields that are usually have a common set of values. There are two main ways to use this class.

If your gadget just wants to display how much of a smoker someone is, it can simply use:

html = "This person smokes: " + person.getField('smoker').getValue();

This value field will be correctly set up by the container. This is a place where the container can even localize the value for the gadget so that it always shows the right thing.

If your gadget wants to have some logic around the smoker field it can use:

if (person.getField('smoker').getKey() != "NO") { //gadget logic here }

Note: The key may be null if the person's smoker field cannot be coerced into one of the standard enum types. The value, on the other hand, is never null.

methods
opensocial.Environment()
Represents the current environment for a gadget.

See also: opensocial.getEnvironment(),

methods
opensocial.Message()
Base interface for all message objects.

See also: opensocial.newMessage(), opensocial.requestSendMessage()

methods
Base interface for all name objects.
methods
opensocial.Organization()
Base interface for all organization objects.
methods
opensocial.Person()
Base interface for all person objects.
methods
opensocial.Phone()
Base interface for all phone objects.
methods
opensocial.ResponseItem()
Represents a response that was generated by processing a data request item on the server.
methods
Base interface for all URL objects.
methods
Namespaces
opensocial
Namespace for top-level people functions.
methods
opensocial.CreateActivityPriority
The priorities a create activity request can have.

See also: opensocial.requestCreateActivity()

opensocial.Permission
The permissions an app can ask for.

See also: opensocial.hasPermission(), opensocial.requestPermission()

opensocial.Activity.Field
All of the fields that activities can have.

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, they may ignore additional parameters.

See also: opensocial.Activity.getField()

opensocial.Activity.MediaItem.Type
The possible types of media items.

See also: opensocial.Activity.MediaItem.Field

opensocial.Activity.MediaItem.Field
All of the fields that media items have.

See also: opensocial.Activity.MediaItem.getField()

opensocial.Address.Field
All of the fields that an address has. These are the supported keys for the Address.getField() method.
opensocial.BodyType.Field
All of the fields that a body type has. These are the supported keys for the BodyType.getField() method.
opensocial.DataRequest.PersonId
Constant person IDs available when fetching person information.
opensocial.DataRequest.Group
Groups available when fetching person information.
opensocial.DataRequest.SortOrder
The sort orders available for ordering person objects.
opensocial.DataRequest.FilterType
The filters available for limiting person requests.
opensocial.DataRequest.PeopleRequestFields
opensocial.Email.Field
All of the fields that an email has. These are the supported keys for the Email.getField() method.
opensocial.Enum.Smoker
The enum keys used by the smoker field.

See also: opensocial.Person.Field.Smoker

opensocial.Enum.Drinker
The enum keys used by the drinker field.

See also: opensocial.Person.Field.Drinker

opensocial.Enum.Gender
The enum keys used by the gender field.

See also: opensocial.Person.Field.Gender

opensocial.Environment.ObjectType
The types of objects in this container.

See also: Environment.supportsField()

opensocial.Message.Field
All of the fields that messages can have.

See also: opensocial.Message.getField()

opensocial.Message.Type
The types of messages that can be sent.
opensocial.Name.Field
All of the fields that a name has. These are the supported keys for the Name.getField() method.
opensocial.Organization.Field
All of the fields that a organization has. These are the supported keys for the Organization.getField() method.
opensocial.Person.Field
All of the fields that a person has. These are the supported keys for the Person.getField() method.
opensocial.Phone.Field
All of the fields that a phone has. These are the supported keys for the Phone.getField() method.
opensocial.ResponseItem.Error
Error codes that a response item can return.
opensocial.Url.Field
All of the fields that a url has. These are the supported keys for the Url.getField() method.
Functions
opensocial.requestSendMessage(recipients, message, opt_callback)
Requests the container to send a specific message to the specified users. If the container does not support this method the callback will be called with a opensocial.ResponseItem. The response item will have its error code set to NOT_IMPLEMENTED.
parameters
Array.<String>, String recipients An ID, array of IDs, or a group reference; the supported keys are VIEWER, OWNER, VIEWER_FRIENDS, OWNER_FRIENDS, or a single ID within one of those groups
opensocial.Message message The message to send to the specified users.
Function opt_callback The function to call once the request has been processed; either this callback will be called or the gadget will be reloaded from scratch. This function will be passed one parameter, an opensocial.ResponseItem. The error code will be set to reflect whether there were any problems with the request. If there was no error, the message was sent. If there was an error, you can use the response item's getErrorCode method to determine how to proceed. The data on the response item will not be set.
opensocial.requestShareApp(recipients, reason, opt_callback)
Requests the container to share this gadget with the specified users. If the container does not support this method the callback will be called with a opensocial.ResponseItem. The response item will have its error code set to NOT_IMPLEMENTED.
parameters
Array.<String>, String recipients An ID, array of IDs, or a group reference; the supported keys are VIEWER, OWNER, VIEWER_FRIENDS, OWNER_FRIENDS, or a single ID within one of those groups
opensocial.Message reason The reason the user wants the gadget to share itself. This reason can be used by the container when prompting the user for permission to share the app. It may also be ignored.
Function opt_callback The function to call once the request has been processed; either this callback will be called or the gadget will be reloaded from scratch. This function will be passed one parameter, an opensocial.ResponseItem. The error code will be set to reflect whether there were any problems with the request. If there was no error, the sharing request was sent. If there was an error, you can use the response item's getErrorCode method to determine how to proceed. The data on the response item will not be set.
opensocial.requestCreateActivity(activity, priority, opt_callback)
Takes an activity and tries to create it, without waiting for the operation to complete. Optionally calls a function when the operation completes.

See also: newActivity()

Note: If this is the first activity that has been created for the user and the request is marked as HIGH priority then this call may open a user flow and navigate away from your gadget. If the container does not support this method the callback will be called with a opensocial.ResponseItem. The response item will have its error code set to NOT_IMPLEMENTED.

parameters
opensocial.Activity activity The activity to create
opensocial.CreateActivityPriority priority The priority for this request
Function opt_callback The function to call once the request has been processed. This callback will either be called or the gadget will be reloaded from scratch. This function will be passed one parameter, an opensocial.ResponseItem. The error code will be set to reflect whether there were any problems with the request. If there was no error, the activity was created. If there was an error, you can use the response item's getErrorCode method to determine how to proceed. The data on the response item will not be set.
opensocial.hasPermission(permission)
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.
parameters
opensocial.Permission permission The permission
returns
Boolean True if the gadget has access for the permission; false if it doesn't
opensocial.requestPermission(permissions, reason, opt_callback)
Requests the user to grant access to the specified permissions. If the container does not support this method the callback will be called with a opensocial.ResponseItem. The response item will have its error code set to NOT_IMPLEMENTED.
parameters
Array.<opensocial.Permission> permissions The permissions to request from the viewer
String reason Displayed to the user as the reason why these permissions are needed
Function opt_callback The function to call once the request has been processed; either this callback will be called or the gadget will be reloaded from scratch. This function will be passed one parameter, an opensocial.ResponseItem. The error code will be set to reflect whether there were any problems with the request. If there was no error, all permissions were granted. If there was an error, you can use opensocial.hasPermission to check which permissions are still denied. The data on the response item will be set. It will be an array of the opensocial.Permissions that were granted.
opensocial.getEnvironment()
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.
returns
opensocial.Environment The current environment
opensocial.newDataRequest()
Creates a data request object to use for sending and fetching data from the server.
returns
opensocial.DataRequest The request object
opensocial.newActivity(params)
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 Fields are supported for more details.

parameters
Map.<opensocial.Activity.Field, Object> params Parameters defining the activity.
returns
opensocial.Activity The new activity object
opensocial.newActivityMediaItem(mimeType, url, opt_params)
Creates a media item associated with an activity. Represents images, movies, and audio. Used when creating activities on the server.
parameters
String mimeType MIME type of the media
String url Where the media can be found
Map.<opensocial.Activity.MediaItem.Field, Object> opt_params Any other fields that should be set on the media item object; all of the defined Fields are supported
returns
opensocial.Activity.MediaItem The new media item object
opensocial.newMessage(body, opt_params)
Creates a media item associated with an activity. Represents images, movies, and audio. Used when creating activities on the server.
parameters
String body The main text of the message.
Map.<opensocial.Message.Field, Object> opt_params Any other fields that should be set on the message object; all of the defined Fields are supported
returns
opensocial.Message The new message object
opensocial.Container.newMessage(body, opt_params)
Creates a media item associated with an activity. Represents images, movies, and audio. Used when creating activities on the server.
parameters
String body The main text of the message.
Map.<opensocial.Message.Field, Object> opt_params Any other fields that should be set on the message object; all of the defined Fields are supported
returns
opensocial.Message The new message object
Gets an ID that can be permanently associated with this activity.
returns
String The ID
opensocial.Activity.getField(key)
Gets the activity data that's associated with the specified key.
parameters
String key The key to get data for; see the Field class for possible values
returns
String The data
opensocial.Activity.setField(key, data)
Sets data for this activity associated with the given key.
parameters
String key The key to set data for
String data The data to set
Gets the media item data that's associated with the specified key.
parameters
String key The key to get data for; see the Field class for possible values
returns
String The data
opensocial.Activity.MediaItem.setField(key, data)
Sets data for this media item associated with the given key.
parameters
String key The key to set data for
String data The data to set
opensocial.Address.getField(key)
Gets data for this body type that is associated with the specified key.
parameters
String key The key to get data for; keys are defined in Address.Field
returns
String The data
opensocial.BodyType.getField(key)
Gets data for this body type that is associated with the specified key.
parameters
String key The key to get data for; keys are defined in BodyType.Field
returns
String The data
Finds the entry with the given ID value, or returns null if none is found.
parameters
String id The ID to look for
returns
Object? The data
Gets the size of this collection, which is equal to or less than the total size of the result.
returns
Number The size of this collection
Executes the provided function once per member of the collection, with each member in turn as the parameter to the function.
parameters
Function fn The function to call with each collection entry
Returns an array of all the objects in this collection.
returns
Array.<Object> The values in this collection
opensocial.Collection.getTotalSize()
Gets the total size of the larger result set that this collection belongs to.
returns
Number The total size of the result
Gets the offset of this collection within a larger result set.
returns
Number The offset into the total collection
opensocial.DataRequest.add(request, opt_key)
Adds an item to fetch (get) or update (set) data from the server. A single DataRequest object can have multiple items. As a rule, each item is executed in the order it was added, starting with the item that was added first. However, items that can't collide might be executed in parallel.
parameters
Object request Specifies which data to fetch or update
String opt_key A key to map the generated response data to
opensocial.DataRequest.send(opt_callback)
Sends a data request to the server in order to get a data response. Although the server may optimize these requests, they will always be executed as though they were serial.
parameters
Function opt_callback The function to call with the data response generated by the server
opensocial.DataRequest.newFetchPersonRequest(id, opt_params)
Creates an item to request a profile for the specified person ID. When processed, returns a Person object.
parameters
String id The ID of the person to fetch; can be the standard person ID of VIEWER or OWNER
Map.<opensocial.DataRequest.PeopleRequestFields, Object> opt_params Additional parameters to pass to the request; this request supports PROFILE_DETAILS
returns
Object A request object
opensocial.DataRequest.newFetchPeopleRequest(idSpec, opt_params)
Creates an item to request friends from the server. When processed, returns a Collection <Person> object.
parameters
Array.<String>, String idSpec An ID, array of IDs, or a group reference used to specify which people to fetch; the supported keys are VIEWER, OWNER, VIEWER_FRIENDS, OWNER_FRIENDS, or a single ID within one of those groups.
Map.<opensocial.DataRequest.PeopleRequestFields, Object> opt_params Additional params to pass to the request
returns
Object A request object
opensocial.DataRequest.newFetchPersonAppDataRequest(idSpec, keys)
Creates an item to request app data for the given people. When processed, returns a Map< PersonId, Map<String, String>> object.
parameters
Array.<String>, String idSpec An ID, array of IDs, or a group reference; the supported keys are VIEWER, OWNER, VIEWER_FRIENDS, OWNER_FRIENDS, or a single ID within one of those groups
Array.<String>, String keys The keys you want data for; this can be an array of key names, a single key name, or "*" to mean "all keys"
returns
Object A request object
opensocial.DataRequest.newUpdatePersonAppDataRequest(id, key, value)
Creates an item to request an update of an app field for the given person. When processed, does not return any data.
parameters
String id The ID of the person to update; only the special VIEWER ID is currently allowed.
String key The name of the key. This may only contain alphanumeric (A-Za-z0-9) characters, underscore(_), dot(.) or dash(-).
String value The value
returns
Object A request object
opensocial.DataRequest.newFetchActivitiesRequest(idSpec, opt_params)
Creates an item to request an activity stream from the server.

When processed, returns an object whose "activities" property is a Collection<Activity> object.

parameters
Array.<String>, String idSpec An ID, array of IDs, or a group reference used to specify which people's activities to fetch; the supported keys are VIEWER, OWNER, VIEWER_FRIENDS, OWNER_FRIENDS, or a single ID within one of those groups.
Map.<opensocial.DataRequest.ActivityRequestFields, Object> opt_params Additional parameters to pass to the request; not currently used
returns
Object A request object
Returns true if there was an error in fetching this data from the server.
returns
Boolean True if there was an error; otherwise, false
Gets the ResponseItem for the requested field.
parameters

key
returns
opensocial.ResponseItem The requested response calculated by the server
opensocial.Email.getField(key)
Gets data for this body type that is associated with the specified key.
parameters
String key The key to get data for; keys are defined in Email.Field
returns
String The data
Use this for logic within your gadget. If they key is null then the value does not fit in the defined enums.
returns
String The enum's key. This should be one of the defined enums below.
opensocial.Enum.getDisplayValue()
The value of this enum. This will be a user displayable string. If the container supports localization, the string will be localized.
returns
String The enum's value.
Returns the current domain — for example, "orkut.com" or "myspace.com".
returns
String The domain
opensocial.Environment.supportsField(objectType, fieldName)
Returns true if the specified field is supported in this container on the given object type.
parameters
opensocial.Environment.ObjectType objectType The object type to check for the field
String fieldName The name of the field to check for
returns
Boolean True if the field is supported on the specified object type
Gets the message data that's associated with the specified key.
parameters
String key The key to get data for; see the Field class for possible values
returns
String The data
opensocial.Message.setField(key, data)
Sets data for this message associated with the given key.
parameters
String key The key to set data for
String data The data to set
opensocial.Name.getField(key)
Gets data for this name that is associated with the specified key.
parameters
String key The key to get data for; keys are defined in Name.Field
returns
String The data
Gets data for this body type that is associated with the specified key.
parameters
String key The key to get data for; keys are defined in Organization.Field
returns
String The data
Gets an ID that can be permanently associated with this person.
returns
String The ID
opensocial.Person.getDisplayName()
Gets a text display name for this person; guaranteed to return a useful string.
returns
String The display name
opensocial.Person.getField(key)
Gets data for this person that is associated with the specified key.
parameters
String key The key to get data for; keys are defined in Person.Field
returns
String The data
Returns true if this person object represents the currently logged in user.
returns
Boolean True if this is the currently logged in user; otherwise, false
Returns true if this person object represents the owner of the current page.
returns
Boolean True if this is the owner of the page; otherwise, false
opensocial.Phone.getField(key)
Gets data for this phone that is associated with the specified key.
parameters
String key The key to get data for; keys are defined in Phone.Field
returns
String The data
Returns true if there was an error in fetching this data from the server.
returns
Boolean True if there was an error; otherwise, false
If the request had an error, returns the error code. The error code can be container-specific or one of the values defined by Error.
returns
String The error code, or null if no error occurred
opensocial.ResponseItem.getErrorMessage()
If the request had an error, returns the error message.
returns
String A human-readable description of the error that occurred; can be null, even if an error occurred
opensocial.ResponseItem.getOriginalDataRequest()
Returns the original data request.
returns
opensocial.DataRequest The data request used to fetch this data response
Gets the response data.
returns
Object The requested value calculated by the server; the type of this value is defined by the type of request that was made
opensocial.Url.getField(key)
Gets data for this URL that is associated with the specified key.
parameters
String key The key to get data for; keys are defined in Url.Field
returns
String The data
Objects
If the activity is of high importance, it will be created even if this requires asking the user for permission. This may cause the container to open a user flow which may navigate away from your gagdet.
If the activity is of low importance, it will not be created if the user has not given permission for the current app to create activities. With this priority, the requestCreateActivity call will never open a user flow.
Access to the viewer person object

A string specifying the title template message ID in the gadget spec.

The title is the primary text of an activity.

Titles may only have the following HTML tags: <b> <i>, <a>, <span>. The container may ignore this formatting when rendering the activity.

A string specifying the primary text of an activity.

Titles may only have the following HTML tags: <b> <i>, <a>, <span>. The container may ignore this formatting when rendering the activity.

opensocial.Activity.Field.TEMPLATE_PARAMS

A map of custom keys to values associated with this activity. These will be used for evaluation in templates.

The data has type Map<String, Object>. The object may be either a String or an opensocial.Person.

When passing in a person with key PersonKey, can use the following replacement variables in the template:

  • PersonKey.DisplayName - Display name for the person
  • PersonKey.ProfileUrl. URL of the person's profile
  • PersonKey.Id - The ID of the person
  • PersonKey - Container may replace with DisplayName, but may also optionally link to the user.
A string specifying the URL that represents this activity.
Any photos, videos, or images that should be associated with the activity. Higher priority ones are higher in the list. The data has type Array< MediaItem>.

A string specifying the body template message ID in the gadget spec.

The body is an optional expanded version of an activity.

Bodies may only have the following HTML tags: <b> <i>, <a>, <span>. The container may ignore this formatting when rendering the activity.

A string specifying an optional expanded version of an activity.

Bodies may only have the following HTML tags: <b> <i>, <a>, <span>. The container may ignore this formatting when rendering the activity.

An optional string ID generated by the posting application.
A string specifing the title of the stream.
A string specifying the stream's URL.
opensocial.Activity.Field.STREAM_SOURCE_URL
A string specifying the stream's source URL.
opensocial.Activity.Field.STREAM_FAVICON_URL
A string specifying the URL for the stream's favicon.
A number between 0 and 1 representing the relative priority of this activity in relation to other activities from the same source
A string ID that is permanently associated with this activity. This value can not be set.
The string ID of the user who this activity is for. This value can not be set.
A string specifying the application that this activity is associated with. This value can not be set.
opensocial.Activity.POSTED_TIME
A string specifying the time at which this activity took place in milliseconds since the epoch. This value can not be set.
The type of media, specified as a MediaItem.Type object.
The MIME type of media, specified as a String.
A string specifying the URL where the media can be found.
The address type or label. Examples: work, my favorite store, my house, etc Specified as a String.
opensocial.Address.Field.UNSTRUCTURED_ADDRESS
If the container does not have structured addresses in its data store, this field will return the unstructured address that the user entered. Use opensocial.getEnvironment().supportsField to see which fields are supported. Specified as a String.
The po box of the address if there is one. Specified as a String.
opensocial.Address.Field.STREET_ADDRESS
The street address. Specified as a String.
opensocial.Address.Field.EXTENDED_ADDRESS
The extended street address. Specified as a String.
The region. Specified as a String.
The locality. Specified as a String.
The postal code. Specified as a String.
The country. Specified as a String.
The latitude. Specified as a Number.
The longitude. Specified as a Number.
The build of the person's body, specified as a string. Not supported by all containers.
The height of the person in meters, specified as a number. Not supported by all containers.
The weight of the person in kilograms, specified as a number. Not supported by all containers.
The eye color of the person, specified as a string. Not supported by all containers.
The hair color of the person, specified as a string. Not supported by all containers.
When used will sort people by the container's definition of top friends.
When used will sort people alphabetically by the name field.
Retrieves all friends.
Retrieves all friends with any data for this application.
An array of opensocial.Person.Field specifying what profile data to fetch for each of the person objects. The server will always include ID, NAME, and THUMBNAIL_URL.
A sort order for the people objects; defaults to TOP_FRIENDS. Possible values are defined by SortOrder.
How to filter the people objects; defaults to ALL. Possible values are defined by FilterType.
When paginating, the index of the first item to fetch. Specified as a Number.
The maximum number of items to fetch; defaults to 20. If set to a larger number, a container may honor the request, or may limit the number to a container-specified limit of at least 20. Specified as a Number.
The email type or label, specified as a String. Examples: work, my favorite store, my house, etc.
The email address, specified as a String.
The title of the message, specified as an opensocial.Message.Type.
The title of the message. HTML attributes are allowed and are sanitized by the container.
The main text of the message. HTML attributes are allowed and are sanitized by the container.
An email.
A short private message.
opensocial.Message.Type.PRIVATE_MESSAGE
A message to a specific user that can be seen only by that user.
opensocial.Message.Type.PUBLIC_MESSAGE
A message to a specific user that can be seen by more than that user.
The family name. Specified as a String.
The given name. Specified as a String.
opensocial.Name.Field.ADDITIONAL_NAME
The additional name. Specified as a String.
opensocial.Name.Field.HONORIFIC_PREFIX
The honorific prefix. Specified as a String.
opensocial.Name.Field.HONORIFIC_SUFFIX
The honorific suffix. Specified as a String.
opensocial.Name.Field.UNSTRUCTURED
The unstructured name. Specified as a String.
The name of the organization. For example, could be a school name or a job company. Specified as a string. Not supported by all containers.
The title or role the person has in the organization, specified as a string. This could be graduate student, or software engineer. Not supported by all containers.
A description or notes about the person's work in the organization, specified as a string. This could be the courses taken by a student, or a more detailed description about a Organization role. Not supported by all containers.
The field the organization is in, specified as a string. This could be the degree pursued if the organization is a school. Not supported by all containers.
The subfield the Organization is in, specified as a string. Not supported by all containers.
The date the person started at the organization, specified as a Date. Not supported by all containers.
The date the person stopped at the organization, specified as a Date. A null date indicates that the person is still involved with the organization. Not supported by all containers.
The salary the person receieves from the organization, specified as a string. Not supported by all containers.
The address of the organization, specified as an opensocial.Address. Not supported by all containers.
A webpage related to the organization, specified as a string. Not supported by all containers.
A string ID that can be permanently associated with this person.
A opensocial.Name object containing the person's name.
A String representing the person's nickname.
Person's photo thumbnail URL, specified as a String. This URL must be fully qualified. Relative URLs will not work in gadgets.
Person's profile URL, specified as a String. This URL must be fully qualified. Relative URLs will not work in gadgets. Not supported by all containers.
opensocial.Person.Field.CURRENT_LOCATION
Person's current location, specified as an Address. Not supported by all containers.
Addresses associated with the person, specified as an Array of Addresses. Not supported by all containers.
Emails associated with the person, specified as an Array of Emails. Not supported by all containers.
Phone numbers associated with the person, specified as an Array of Phones. Not supported by all containers.
A general statement about the person, specified as a String. Not supported by all containers.
Person's status, headline or shoutout, specified as a String. Not supported by all containers.
Person's profile song, specified as an opensocial.Url. Not supported by all containers.
Person's profile video, specified as an opensocial.Url. Not supported by all containers.
Person's gender, specified as an opensocial.Enum with the enum's key referencing opensocial.Enum.Gender. Not supported by all containers.
opensocial.Person.Field.SEXUAL_ORIENTATION
Person's sexual orientation, specified as a String. Not supported by all containers.
opensocial.Person.Field.RELATIONSHIP_STATUS
Person's relationship status, specified as a String. Not supported by all containers.
Person's age, specified as a number. Not supported by all containers.
Person's date of birth, specified as a Date object. Not supported by all containers.
Person's body characteristics, specified as an opensocial.BodyType. Not supported by all containers.
Person's ethnicity, specified as a String. Not supported by all containers.
Person's smoking status, specified as an opensocial.Enum with the enum's key referencing opensocial.Enum.Smoker. Not supported by all containers.
Person's drinking status, specified as an opensocial.Enum with the enum's key referencing opensocial.Enum.Drinker. Not supported by all containers.
Description of the person's children, specified as a String. Not supported by all containers.
Description of the person's pets, specified as a String. Not supported by all containers.
opensocial.Person.Field.LIVING_ARRANGEMENT
Description of the person's living arrangement, specified as a String. Not supported by all containers.
Person's time zone, specified as the difference in minutes between Greenwich Mean Time (GMT) and the user's local time. See Date.getTimezoneOffset() in javascript for more details on this format. Not supported by all containers.
opensocial.Person.Field.LANGUAGES_SPOKEN
List of the languages that the person speaks as ISO 639-1 codes, specified as an Array of Strings. Not supported by all containers.
Jobs the person has held, specified as an Array of Organizations. Not supported by all containers.
Person's favorite jobs, or job interests and skills, specified as a String. Not supported by all containers.
Schools the person has attended, specified as an Array of Organizations. Not supported by all containers.
Person's interests, hobbies or passions, specified as an Array of Strings. Not supported by all containers.
URLs related to the person, their webpages, or feeds. Specified as an Array of opensocial.Url. Not supported by all containers.
Person's favorite music, specified as an Array of Strings. Not supported by all containers.
Person's favorite movies, specified as an Array of Strings. Not supported by all containers.
Person's favorite TV shows, specified as an Array of Strings. Not supported by all containers.
Person's favorite books, specified as an Array of Strings. Not supported by all containers.
Person's favorite activities, specified as an Array of Strings. Not supported by all containers.
Person's favorite sports, specified as an Array of Strings. Not supported by all containers.
Person's favorite heroes, specified as an Array of Strings. Not supported by all containers.
Person's favorite quotes, specified as an Array of Strings. Not supported by all containers.
Person's favorite cars, specified as an Array of Strings. Not supported by all containers.
Person's favorite food, specified as an Array of Strings. Not supported by all containers.
Person's turn ons, specified as an Array of Strings. Not supported by all containers.
Person's turn offs, specified as an Array of Strings. Not supported by all containers.
Arbitrary tags about the person, specified as an Array of Strings. Not supported by all containers.
Person's comments about romance, specified as a String. Not supported by all containers.
What the person is scared of, specified as a String. Not supported by all containers.
Describes when the person is happiest, specified as a String. Not supported by all containers.
Person's thoughts on fashion, specified as a String. Not supported by all containers.
Person's thoughts on humor, specified as a String. Not supported by all containers.
Person's statement about who or what they are looking for, or what they are interested in meeting people for. Specified as a String. Not supported by all containers.
Person's relgion or religious views, specified as a String. Not supported by all containers.
opensocial.Person.Field.POLITICAL_VIEWS
Person's political views, specified as a String. Not supported by all containers.
The phone number type or label, specified as a String. Examples: work, my favorite store, my house, etc.
The phone number, specified as a String.
opensocial.ResponseItem.NOT_IMPLEMENTED
This container does not support the request that was made.
The gadget does not have access to the requested data. To get access, use opensocial.requestPermission().
The gadget can never have access to the requested data.
The request was invalid. Example: 'max' was -1.
The request encountered an unexpected condition that prevented it from fulfilling the request.
The url number type or label. Examples: work, blog feed, website, etc Specified as a String.
The text of the link. Specified as a String.
The address the url points to. Specified as a String.
Generated by JsDoc Toolkit 1.4.0 on Thu, 13 Mar 2008 20:19:03 GMT.