Namespace 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()
Defined in: opensocial.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
| Field Attributes | Field Name and Description |
|---|---|
| <static> |
opensocial.Activity.Field.APP_ID
A string specifying the application that this activity is associated with.
|
| <static> |
opensocial.Activity.Field.BODY
A string specifying an optional expanded version of an activity. |
| <static> |
opensocial.Activity.Field.BODY_ID
A string specifying the body template message ID in the gadget spec. |
| <static> |
opensocial.Activity.Field.EXTERNAL_ID
An optional string ID generated by the posting application.
|
| <static> |
opensocial.Activity.Field.ID
A string ID that is permanently associated with this activity.
|
| <static> |
opensocial.Activity.Field.MEDIA_ITEMS
Any photos, videos, or images that should be associated
with the activity.
|
| <static> |
opensocial.Activity.Field.POSTED_TIME
A string specifying the time at which this activity took place
in milliseconds since the epoch.
|
| <static> |
opensocial.Activity.Field.PRIORITY
A number between 0 and 1 representing the relative priority of
this activity in relation to other activities from the same source
|
| <static> |
opensocial.Activity.Field.STREAM_FAVICON_URL
A string specifying the URL for the stream's favicon.
|
| <static> |
opensocial.Activity.Field.STREAM_SOURCE_URL
A string specifying the stream's source URL.
|
| <static> |
opensocial.Activity.Field.STREAM_TITLE
A string specifing the title of the stream.
|
| <static> |
opensocial.Activity.Field.STREAM_URL
A string specifying the stream's URL.
|
| <static> |
opensocial.Activity.Field.TEMPLATE_PARAMS
A map of custom keys to values associated with this activity. |
| <static> |
opensocial.Activity.Field.TITLE
A string specifying the primary text of an activity. |
| <static> |
opensocial.Activity.Field.TITLE_ID
A string specifying the title template message ID in the gadget spec. |
| <static> |
opensocial.Activity.Field.URL
A string specifying the
URL that represents this activity.
|
| <static> |
opensocial.Activity.Field.USER_ID
The string ID of the user who this activity is for.
|
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.
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.
Array<
MediaItem>.
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 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 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.