Launch Week Day 1: Socket for Jira Is Now Available.Learn More
Socket
Book a DemoSign in
Socket

pepwave

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pepwave

PEPWAVE API Client for Node.js

latest
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
3
-50%
Maintainers
1
Weekly downloads
 
Created
Source

node-pepwave

npm version

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.

Keywords

pepwave

FAQs

Package last updated on 12 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts