static osapi.jive.corev3.activities

Static class for creating and getting activity in the requesting user's activity stream. See the Activity class for detailed information on what an activity is. Used for generating all sorts of activity such as actions, or activities sent to individuals. See the actions static class.

Examples:
Create an activity

The simplest example of creating an activity stream entry. See Activity Creation for full details on creating activity stream entries.

 //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);
 });
Get activities

Retrieves a list of activity stream entries in the requesting user's activity stream.

 //Get a list of activities for current user
 var request = osapi.jive.corev3.activities.get({
     "count": 10
 });

 request.execute(function(data) {
     console.log("Fetched " + data.list.length + "activities!", data);
 });

Methods

create(activity,options)
POST /activities

Retrieves

Activity

Description

Create a new activity stream entries of the following types:

  • Activity - standard activity stream entry (appears in one of the standard or custom activity streams).
  • Action - notification delivered to specific people that can have zero or more actions a user can take (appears on the Actions page).

See Activity Creation for full details on creating activity stream entries of each of these types programmatically.

Takes:
Options:
NameTypeRequiredDescription
fieldsStringfalseNames of the fields to be returned
Retrieves:
  • Activity, or Action describing the newly created activity
  • get(options)
    GET /activities

    Retrieves

    Activity[]

    Description

    Return a paginated list of activity stream entries that match the specified criteria.

    Options:
    NameTypeRequiredDescription
    afterStringfalseDate/time representing the minimum timestamp for returned activities (default is no limit). Cannot specify both after and before
    beforeStringfalseDate/time representing the maximum timestamp for returned activities (default is now). Cannot specify both after and before
    countIntegerfalseMaximum number of activities to return in this request (default is 25)
    fieldsStringfalseNames of the fields to be returned
    Retrieves:
  • Activity[]
  • getCount(options)
    GET /activities/count

    Retrieves

    Object

    Description

    getFrequentPeople(options)
    GET /activities/frequent/people

    Retrieves

    Object[]

    Description