English | Site Directory

opensocial.Activity.Field (v0.7)

 SUMMARY     DETAIL

Static Class 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()

Field Summary

<static> object APP_ID
A string specifying the application that this activity is associated with.
<static> object BODY

A string specifying an optional expanded version of an activity.

<static> object BODY_ID

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

<static> object EXTERNAL_ID
An optional string ID generated by the posting application.
<static> object ID
A string ID that is permanently associated with this activity.
<static> object MEDIA_ITEMS
Any photos, videos, or images that should be associated with the activity.
<static> object POSTED_TIME
A string specifying the time at which this activity took place in milliseconds since the epoch.
<static> object PRIORITY
A number between 0 and 1 representing the relative priority of this activity in relation to other activities from the same source
<static> object STREAM_FAVICON_URL
A string specifying the URL for the stream's favicon.
<static> object STREAM_SOURCE_URL
A string specifying the stream's source URL.
<static> object STREAM_TITLE
A string specifing the title of the stream.
<static> object STREAM_URL
A string specifying the stream's URL.
<static> object TEMPLATE_PARAMS

A map of custom keys to values associated with this activity.

<static> object TITLE

A string specifying the primary text of an activity.

<static> object TITLE_ID

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

<static> object URL
A string specifying the URL that represents this activity.
<static> object USER_ID
The string ID of the user who this activity is for.
 

Field Detail

APP_ID

<static> object APP_ID
    A string specifying the application that this activity is associated with. This value can not be set.

BODY

<static> object BODY

    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.

BODY_ID

<static> object BODY_ID

    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.

EXTERNAL_ID

<static> object EXTERNAL_ID
    An optional string ID generated by the posting application.

ID

<static> object ID
    A string ID that is permanently associated with this activity. This value can not be set.

MEDIA_ITEMS

<static> object MEDIA_ITEMS
    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>.

POSTED_TIME

<static> object POSTED_TIME
    A string specifying the time at which this activity took place in milliseconds since the epoch. This value can not be set.

PRIORITY

<static> object PRIORITY
    A number between 0 and 1 representing the relative priority of this activity in relation to other activities from the same source

STREAM_FAVICON_URL

<static> object STREAM_FAVICON_URL
    A string specifying the URL for the stream's favicon.

STREAM_SOURCE_URL

<static> object STREAM_SOURCE_URL
    A string specifying the stream's source URL.

STREAM_TITLE

<static> object STREAM_TITLE
    A string specifing the title of the stream.

STREAM_URL

<static> object STREAM_URL
    A string specifying the stream's URL.

TEMPLATE_PARAMS

<static> object 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.

TITLE

<static> object TITLE

    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.

TITLE_ID

<static> object TITLE_ID

    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.

URL

<static> object URL
    A string specifying the URL that represents this activity.

USER_ID

<static> object USER_ID
    The string ID of the user who this activity is for. This value can not be set.

Documentation generated by JsDoc Toolkit 1.3.3