-
Notifications
You must be signed in to change notification settings - Fork 1
2. Events
leonidumanskiy edited this page Jan 23, 2017
·
3 revisions
Events are the simplest way of logging non-persistent data into the system. Main method to log event is "logEvent".
###logEvent Logs specific event.
{
"jsonrpc": "2.0",
"method": "logEvent",
"params": {
"name": "MissionFailedEvent",
"time": 1474562400326
"contextId": "0001010203040506070809AAFF",
"data": {
"missionName": "FollowTheWhiteRabbit"
}
},
"id": 1
}Parameters:
- name - contains name, for example, MissionFailedEvent
- time - optional parameter, unix timestamp in milliseconds (UTC). If not provided, server time from Date.now() will be used.
- contextId - (optional) id of the context, which this event belongs to
- data - might contain any random data associated with event, for example missionName.