m2m-status

1.0.2 • Public • Published

m2m-status

npm version npm downloads Build Status Coverage Status Code Climate dependency Status devDependency Status

Check status of your m2mdataglobal sims

Installation

npm i -S m2m-status

Use

Try on RunKit

const M2M = require('m2m-status')
 
const user = 'your-user'
const password = 'your-password'
const sim = '+569XXXXXXXX'
 
const client = new M2M({user: user, password: password})
client.checkSim(sim).then(console.log).catch(console.error)
/*
{
  icc: 'XXXXXXXXXXXXXXXXXXX',
  sim: '+569XXXXXXXX',
  imei: 'XXXXXXXXXXXXXXX',
  device: 'SIM840W',
  country: 'Chile',
  type: 'Local',
  plan: 'GPS_CL_20M_BAS_CH',
  customs: [ '', '' ],
  provider: {
    state: 'ACTIVE',
    ip: 'XXX.XXX.XXX.XXX',
    apn: 'm2m.movistar.cl',
    country: 'Chile',
    operator: 'Movistar Chile',
    gprs: 'Activos'
  },
  traffic: {
    monthly: {voice: '238', data: '15933440', sms: '0'},
    daily: {voice: '0', data: '1162240', sms: '0'}
  },
  enterprise: null,
  status: {admin: true, gsm: true, gprs: true}
}
*/
client.checkIcc(icc).then(console.log).catch(console.error);
/*
{
  icc: 'XXXXXXXXXXXXXXXXXXX',
  sim: '+569XXXXXXXX',
  imei: 'XXXXXXXXXXXXXXX',
  device: 'SIM840W',
  country: 'Chile',
  type: 'Local',
  plan: 'GPS_CL_20M_BAS_CH',
  customs: [ '', '' ],
  provider: {
    state: 'ACTIVE',
    ip: 'XXX.XXX.XXX.XXX',
    apn: 'm2m.movistar.cl',
    country: 'Chile',
    operator: 'Movistar Chile',
    gprs: 'Activos'
  },
  traffic: {
    monthly: {voice: '238', data: '15933440', sms: '0'},
    daily: {voice: '0', data: '1162240', sms: '0'}
  },
  enterprise: null,
  status: {admin: true, gsm: true, gprs: true}
}
*/
client.listSims().then(console.log).catch(console.error);
/*
[{
  icc: 'XXXXXXXXXXXXXXXXXXX',
  sim: '+569XXXXXXXX',
  imei: 'XXXXXXXXXXXXXXX',
  device: 'SIM840W',
  country: 'Chile',
  type: 'Local',
  plan: 'GPS_CL_20M_BAS_CH',
  customs: [ '', '' ],
  provider: {
    state: 'ACTIVE',
    ip: 'XXX.XXX.XXX.XXX',
    apn: 'm2m.movistar.cl',
    country: 'Chile',
    operator: 'Movistar Chile',
    gprs: 'Activos'
  },
  traffic: {
    monthly: {voice: '238', data: '15933440', sms: '0'},
    daily: {voice: '0', data: '1162240', sms: '0'}
  },
  enterprise: null
}]
*/

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i m2m-status

Weekly Downloads

3

Version

1.0.2

License

MIT

Last publish

Collaborators

  • lgatica