Skip to content

Services

Iosif Miclaus edited this page Jul 14, 2016 · 3 revisions

Overview

ActivityService

  • commitActivity(activity):boolean - Commiting an activity object locally to a private activity stack. Returns true if everything went okay, returns false and throws Passed an invalid activity object.
  • pushActivity():Promise - Pushes the stack of activities to server.

Activity object: An object describing the activity that should be commited locally. The activity object requires the following format:

var activity = {
  type: ActivityService.TYPES.{ACTIVITY_TYPE},
  name: ActivityService.{ACTIVITY_TYPE}.{ACTIVITY_NAME}
  payload: {
    {ACTIVITY_PAYLOAD}
  }
}