/
Opensocial.Person (v0.9)

Opensocial.Person (v0.9)

NeedsExamples

opensocial.Person

Base interface for all person objects.

Methods

opensocial.Person.getAppData

;String getAppData(key)

Parameters
NameTypeDescription |

key

String

The key to get app data for.

Returns
TypeDescription |

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
TypeDescription |

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
NameTypeDescription |

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
TypeDescription |

String

The data

Description
Gets data for this person that is associated with the specified key.

opensocial.Person.getId

;String getId()

Returns
TypeDescription |

String

The ID

Description
Gets an ID that can be permanently associated with this person.

opensocial.Person.isOwner

;Boolean isOwner()

Returns
TypeDescription |

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
TypeDescription |

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

A general statement about the person, specified as a string. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'aboutMe'.

opensocial.Person.Field.ACTIVITIES

Person's favorite activities, specified as an Array of strings. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'activities'.

opensocial.Person.Field.ADDRESSES

Addresses associated with the person, specified as an Array of Address es. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'addresses'.

opensocial.Person.Field.AGE

Person's age, specified as a number. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'age'.

opensocial.Person.Field.BODY_TYPE

Person's body characteristics, specified as an opensocial.BodyType. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'bodyType'.

opensocial.Person.Field.BOOKS

Person's favorite books, specified as an Array of strings. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'books'.

opensocial.Person.Field.CARS

Person's favorite cars, specified as an Array of strings. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'cars'.

opensocial.Person.Field.CHILDREN

Description of the person's children, specified as a string. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'children'.

opensocial.Person.Field.CURRENT_LOCATION

<static> Member of: opensocial.Person.Field.CURRENT_LOCATION Person's current location, specified as an Address. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'currentLocation'.

opensocial.Person.Field.DATE_OF_BIRTH

Person's date of birth, specified as a Date object. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'dateOfBirth'.

opensocial.Person.Field.DRINKER

Person's drinking status, specified as an opensocial.Enum with the enum's key referencing opensocial.Enum.Drinker. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'drinker'.

opensocial.Person.Field.EMAILS

Emails associated with the person, specified as an Array of Email s. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'emails'.

opensocial.Person.Field.ETHNICITY

Person's ethnicity, specified as a string. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'ethnicity'.

opensocial.Person.Field.FASHION

Person's thoughts on fashion, specified as a string. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'fashion'.

opensocial.Person.Field.FOOD

Person's favorite food, specified as an Array of strings. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'food'.

opensocial.Person.Field.GENDER

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

opensocial.Person.Field.HAPPIEST_WHEN

Describes when the person is happiest, specified as a string. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'happiestWhen'.

opensocial.Person.Field.HAS_APP

A boolean indicating whether the person has used the current app. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'hasApp'.

opensocial.Person.Field.HEROES

Person's favorite heroes, specified as an Array of strings. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'heroes'.

opensocial.Person.Field.HUMOR

Person's thoughts on humor, specified as a string. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'humor'.

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'. For the anonymous VIEWER, this value MUST be -1.

opensocial.Person.Field.INTERESTS

Person's interests, hobbies or passions, specified as an Array of strings. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'interests'.

opensocial.Person.Field.JOB_INTERESTS

Person's favorite jobs, or job interests and skills, specified as a string. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'jobInterests'.

opensocial.Person.Field.JOBS

Jobs the person has held, specified as an Array of Organization s. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'jobs'.

opensocial.Person.Field.LANGUAGES_SPOKEN

<static> Member of: opensocial.Person.Field.LANGUAGES_SPOKEN List of the languages that the person speaks as ISO 639-1 codes, specified as an Array of strings. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'languagesSpoken'.

opensocial.Person.Field.LIVING_ARRANGEMENT

<static> Member of: opensocial.Person.Field.LIVING_ARRANGEMENT Description of the person's living arrangement, specified as a string. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'livingArrangement'.

opensocial.Person.Field.LOOKING_FOR

Person's statement about who or what they are looking for, or what they are interested in meeting people for. Specified as an Array of opensocial.Enum with the enum's key referencing opensocial.Enum.LookingFor. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'lookingFor'.

opensocial.Person.Field.MOVIES

Person's favorite movies, specified as an Array of strings. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'movies'.

opensocial.Person.Field.MUSIC

Person's favorite music, specified as an Array of strings. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'music'.

opensocial.Person.Field.NAME

A opensocial.Name object containing the person's name. This field may be used interchangeably with the string 'name'. For the anonymous VIEWER, this value may be a user friendly name such as Guest, Anonymous, depending on the browser locale.

opensocial.Person.Field.NETWORK_PRESENCE

<static> Member of: opensocial.Person.Field.NETWORK_PRESENCE Person's current network status. Specified as an Enum with the enum's key referencing opensocial.Enum.Presence. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'networkPresence'.

opensocial.Person.Field.NICKNAME

A String representing the person's nickname. This represents the casual way to address this person in real life. This field may be used interchangeably with the string 'nickname'. For the anonymous VIEWER, this value may be a user friendly nickname such as Guest, Anonymous, depending on the browser locale.

opensocial.Person.Field.PETS

Description of the person's pets, specified as a string. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'pets'.

opensocial.Person.Field.PHONE_NUMBERS

Phone numbers associated with the person, specified as an Array of Phone s. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'phoneNumbers'.

opensocial.Person.Field.POLITICAL_VIEWS

Person's political views, specified as a string. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'politicalViews'.

opensocial.Person.Field.PROFILE_SONG

Person's profile song, specified as an opensocial.Url. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'profileSong'.

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. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'profileUrl'.

opensocial.Person.Field.PROFILE_VIDEO

Person's profile video, specified as an opensocial.Url. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'profileVideo'.

opensocial.Person.Field.QUOTES

Person's favorite quotes, specified as an Array of strings. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'quotes'.

opensocial.Person.Field.RELATIONSHIP_STATUS

<static> Member of: opensocial.Person.Field.RELATIONSHIP_STATUS Person's relationship status, specified as a string. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'relationshipStatus'.

opensocial.Person.Field.RELIGION

Person's relgion or religious views, specified as a string. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'religion'.

opensocial.Person.Field.ROMANCE

Person's comments about romance, specified as a string. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'romance'.

opensocial.Person.Field.SCARED_OF

What the person is scared of, specified as a string. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'scaredOf'.

opensocial.Person.Field.SCHOOLS

Schools the person has attended, specified as an Array of Organization s. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'schools'.

opensocial.Person.Field.SEXUAL_ORIENTATION

<static> Member of: opensocial.Person.Field.SEXUAL_ORIENTATION Person's sexual orientation, specified as a string. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'sexualOrientation'.

opensocial.Person.Field.SMOKER

Person's smoking status, specified as an opensocial.Enum with the enum's key referencing opensocial.Enum.Smoker. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'smoker'.

opensocial.Person.Field.SPORTS

Person's favorite sports, specified as an Array of strings. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'sports'.

opensocial.Person.Field.STATUS

Person's status, headline or shoutout, specified as a string. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'status'.

opensocial.Person.Field.TAGS

Arbitrary tags about the person, specified as an Array of strings. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'tags'.

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'. For the anonymous VIEWER, this value may be a standard representation of an anonymous user on the site.

opensocial.Person.Field.TIME_ZONE

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. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'timeZone'.

opensocial.Person.Field.TURN_OFFS

Person's turn offs, specified as an Array of strings. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'turnOffs'.

opensocial.Person.Field.TURN_ONS

Person's turn ons, specified as an Array of strings. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'turnOns'.

opensocial.Person.Field.TV_SHOWS

Person's favorite TV shows, specified as an Array of strings. Container support for this field is OPTIONAL. This field may be used interchangeably with the string 'tvShows'.

opensocial.Person.Field.URLS

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

{{ JsApiAlphaList_(v0.9) }}