Modules
- wireless-monitor
Wireless Monitor class
Classes
- Monitor
Class representing your Monitor
wireless-monitor
Wireless Monitor class
Monitor
Class representing your Monitor
Kind: global class
- Monitor
- new Monitor([url], api_key, monitor_key)
- .auth() ⇒
Promise
- .send([payload]) ⇒
Promise
- .refreshToken() ⇒
Promise
new Monitor([url], api_key, monitor_key)
Creates a Monitor instance capable of communicate with a Wireless Monitor server located at the url you specify.
Param | Type | Default | Description |
---|---|---|---|
[url] | String |
http://localhost:8000 |
URL of the server |
api_key | String |
This value specifies the user. Must be in UUID format. | |
monitor_key | String |
This value specifies the device. Must be in UUID format. |
monitor.auth() ⇒ Promise
Authentication method, use as the initial process.
Kind: instance method of Monitor
monitor.send([payload]) ⇒ Promise
Sends a payload to the server.
Kind: instance method of Monitor
Param | Type | Default | Description |
---|---|---|---|
[payload] | Object |
{} |
Object representing the data you wish to send |
monitor.refreshToken() ⇒ Promise
After an amount of specific time or number of requests, you need to refresh your token.
Kind: instance method of Monitor