pepwave
v0.1.0
Published
PEPWAVE API Client for Node.js
Downloads
2
Readme
node-pepwave
PEPWAVE API Client for Node.js
Install
$ npm install pepwave --save
Overview
For now this client just has available login
and getGeoInfo
functions.
const Pepwave = require('pepwave');
const pepwave = new Pepwave({
url: 'http://192.168.50.1',
username: 'admin',
password: 'admin',
});
pepwave
.login()
.then(console.log)
.catch(console.error);
Pepwave API
.login()
Logins into Pepwave with username
and password
provided in constructor.
pepwave
.login()
.then((response) => {
// response:
//
// {
// "stat": "ok",
// "response": {
// "permission": {
// "GET": 1,
// "POST": 1
// }
// }
// }
});
.getGeoInfo()
Get latitude and longitude from connected GPS.
pepwave
.getGeoInfo()
.then((response) => {
// response:
//
// {
// "data": {
// "geoinfo": {
// "timestamp": "1505234274",
// "latlng": {
// "timestamp": "1505234267",
// "lat": "29.095247",
// "lng": "-110.96005"
// }
// }
// }
// }
});
Note: Before using this function make sure you have called .login()
first.