README
jiofi
API for JioFi device dashboard
🙋♂️ Made by @abhijithvijayan
❤️ it? ⭐️ it on GitHub or Tweet about it.
Table of Contents
Installation
Ensure you have Node.js 10 or later installed. Then run the following:
# via npm
npm install jiofi
# or yarn
yarn add jiofi
Usage
const JioFi = require('jiofi');
const jiofiDevice = new JioFi();
(async () => {
const info = await jiofiDevice.getInfo();
console.log(info);
//=> {imei: '1234567890001111', hardwareVersion: 'HVT_JMR1040_D01', macAddress: 'xx:xx:xx:xx:xx:xx', model: 'JioFi JMR1040', serialNumber: 'ABCDEFG12345678'}
const state = await jiofiDevice.getState();
console.log(state);
//=> {battery: {exist: true, state: 'Discharging', mode: null, percent: 65}}
})();
API
JioFi()
Returns a new instance.
Instance
.getInfo()
Get hardware information.
.getState()
Get device's Battery state, Uplink/Downlink stats, CPU Usage, and Data Usage.
Issues
Looking to contribute? Look for the Good First Issue label.
Tested on
- JioFi JMR1040
🐛 Bugs
Please file an issue here for bugs, missing documentation, or unexpected behavior.
Linting & TypeScript Config
- Shared Eslint & Prettier Configuration -
@abhijithvijayan/eslint-config
- Shared TypeScript Configuration -
@abhijithvijayan/tsconfig
License
MIT © Abhijith Vijayan