osapi.jive.corev3.activities.Activity
An Activity represents an event that has occurred within a Jive instance. Activities are presented in the format defined by the OpenSocial Specification, which in turn extends the Activity Streams 1.0 specification. Activities are used for several different purposes within the Core API, which are described in more detail in Activity Use Cases.
Note that activities are not first-class objects and do not have URIs, so instead the URL of the object of the activity is given. In the following example, the "object" field is a document that was created.
Examples:
See the activities static class for how to create and get activities.
Example JSON
JSON with the most important data for an Activity. See the table below for a list of all fields.
{ "url":"http://company.jive.com/docs/DOC-2131", "title":"A test document", "verb":"jive:created", "updated":"2012-09-28T15:35:20.761+0000", "content":"<a href=\"http://company.jive.com/people/fred\">Fred Flintstone</a> created <a href=\"http://company.jive.com/docs/DOC-2131\">A test document</a>", "object":{ "displayName":"A test document", "objectType":"jive:document", "url":"http://company.jive.com/docs/DOC-2131", "summary":"Test document text", }, "actor":{ "displayName":"Fred Flintstone", "objectType":"jive:person", "url":"http://company.jive.com/people/fred" } }
Create an activity
The simplest example of creating an activity stream entry. See Activity Creation for full details on creating activity stream entries programmatically. See activities for how to get activities.
//Create a simple activity var request = osapi.jive.corev3.activities.create({ "title": "Free food in the breakroom", "content": "There is some free cake in the breakroom for Jane's birthday" }); request.execute(function(data) { console.log("Activity created!", data); });
Properties
Methods
Properties
Property | Type | Mode † | Description |
---|---|---|---|
actor | Object | read-only | ↑ The person (or other object) that created this activity. |
content | String | required | ↑ Text (or possibly HTML) content describing this activity. |
generator | Object | read-only | ↑ The application used to generate this activity. |
icon | MediaLink | optional | ↑ An icon associated with this activity. |
id | String | read-only | ↑ Internal identifier for this activity. |
jive | JiveExtension | optional | ↑ Jive extensions to the standard Activity Streams format. |
object | Object | optional | ↑ The object that was affected by this activity. |
openSocial | OpenSocial | optional | ↑ OpenSocial extensions to the standard Activity Streams format. |
previewImage | MediaLink | read-only | ↑ An icon associated with this activity. |
provider | Object | read-only | ↑ The service instance at which this activity was generated. |
published | ISO 8601 Date | read-only | ↑ The date and time at which this activity was generated. |
target | Object | optional | ↑ The object representing the "context" or "target" of this activity. |
title | String | required | ↑ The title of this activity. |
type | String | read-only | ↑ The object type ("activity"). |
updated | ISO 8601 Date | read-only | ↑ The date and time at which this activity was most recently updated. |
url | String | optional | ↑ A URL pointing at more detailed information related to this activity. |
verb | String | optional | ↑ The verb describing the category of activity that took place. Verbs for Jive
standard actions are prefixed with jive: and are for internal use by Jive.
Possible values include:
|
Methods
toURI()
Retrieves
String