Opensocial.Person (v0.9)

From VZ Developer Wiki
Jump to: navigation, search

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

opensocial.Person

Base interface for all person objects.

Methods

opensocial.Person.getAppData

String getAppData(key)
Parameters
Name Type Description
key String The key to get app data for.
Returns
Type Description
String The corresponding app data.
Description
Gets the app data for this person that is associated with the specified key.

opensocial.Person.getDisplayName

String getDisplayName()
Returns
Type Description
String The display name
Description
Gets a text display name for this person; guaranteed to return a useful string.

opensocial.Person.getField

String getField(key, opt_params)
Parameters
Name Type Description
key String The key to get data for; keys are defined in Person.Field
opt_params Map.<opensocial.DataRequest.DataRequestFields|Object> Additional params to pass to the request.
Returns
Type Description
String The data
Description
Gets data for this person that is associated with the specified key.

opensocial.Person.getId

String getId()
Returns
Type Description
String The ID
Description
Gets an ID that can be permanently associated with this person.

opensocial.Person.isOwner

Boolean isOwner()
Returns
Type Description
Boolean True if this is the owner of the page; otherwise, false
Description
Returns true if this person object represents the owner of the current page.

opensocial.Person.isViewer

Boolean isViewer()
Returns
Type Description
Boolean True if this is the currently logged in user; otherwise, false
Description
Returns true if this person object represents the currently logged in user.

opensocial.Person.Field

All of the fields that a person has. These are the supported keys for the Person.getField() method.

opensocial.Person.Field.ID

A string ID that can be permanently associated with this person. This field may be used interchangeably with the string 'id'.

opensocial.Person.Field.NAME

A opensocial.Name object containing the person's name. This field may be used interchangeably with the string 'name'.

opensocial.Person.Field.THUMBNAIL_URL

Person's photo thumbnail URL, specified as a string. This URL must be fully qualified. Relative URLs will not work in gadgets. This field may be used interchangeably with the string 'thumbnailUrl'.

opensocial.Person.Field.PROFILE_URL

Person's profile URL, specified as a string. This URL must be fully qualified. Relative URLs will not work in gadgets. This field may be used interchangeably with the string 'profileUrl'.

opensocial.Person.Field.ADDRESSES

Addresses associated with the person, specified as an Array of Addresses. This field may be used interchangeably with the string 'addresses'.

opensocial.Person.Field.EMAILS

Emails associated with the person, specified as an Array of Emails. This field may be used interchangeably with the string 'emails'.

opensocial.Person.Field.PHONE_NUMBERS

Phone numbers associated with the person, specified as an Array of Phones. This field may be used interchangeably with the string 'phoneNumbers'.

opensocial.Person.Field.GENDER

Person's gender, specified as an opensocial.Enum with the enum's key referencing opensocial.Enum.Gender. This field may be used interchangeably with the string 'gender'.

opensocial.Person.Field.URLS

URLs related to the person, their webpages, or feeds. Specified as an Array of opensocial.Url. This field may be used interchangeably with the string 'urls'.

VZ specific fields

opensocial.Person.Field.DISPLAY_NAME

Full name of the user. This field may be used interchangeably with the string 'displayName'.

opensocial.Person.Field.PUBLISHED

Date when the user's vcard was published. This field may be used interchangeably with the string 'published'.

opensocial.Person.Field.UPDATED

Date when the user's vcard was last updated. This field may be used interchangeably with the string 'updated'.

opensocial.Person.Field.BIRTHDAY

User's birthday. May be only partial (e.g. 31-12-0000). This field may be used interchangeably with the string 'birthday'.

opensocial.Person.Field.PHOTOS

Array of the urls to the user's profile photos in different sizes (1st max width 50px, 2nd max width 100px, 3rd max width 200px). This field may be used interchangeably with the string 'photos'.

opensocial.Person.Field.REGISTERED_SINCE

Date when the user registered at VZ. This field may be used interchangeably with the string 'registeredSince'.

opensocial.Person.Field.PLATFORM

name of platform where the current user is registered (Svz; studiVZ, Avz: meinVZ, Pvz: schülerVZ). This field may be used interchangeably with the string 'platform'.

opensocial.Person.Field.LAST_LOGIN

internal apps only. This field may be used interchangeably with the string 'lastLogin'.


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