mtrack-node v0.0.4
MTrack-Client-Node
This is a client library for MTrack, for those who develop in Node.js
Installation
var mtrack=require('mtrack-node');
Apis
SendHBeat
The sendHBeat method can be used to send an "i'm alive" message to the MTrack backend. All messages will be stored but that doesn't mean that will be counted. Depending on the information visualized by the MTrack UI the HBeat count can be limited to 1 per day or to any other logic.
To post an hbeat use the following method:
mtrack.sendHBeat( options, callback );
Where:
options: JSON variable containing all needed options. Some are mandatory while other optional.
callback: a callback function
Options
url: Mandatory The url of the MTrack backend, e.g. http://localhost:9080
app_id: Mandatory Identifier of the app, as registered in MTrack, e.g. 1
osversion: Optional Version of the OS, e.g. "3.0"
locale: Optional Locale used in your app, e.g. "EN"
appversion: Mandatory Version of the application, e.g. "0.45"