npm.io
1.0.2 • Published 7 years ago

navixy-js-sdk

Licence
MIT
Version
1.0.2
Deps
1
Size
1.3 MB
Vulns
24
Weekly
0
DeprecatedThis package is deprecated

Navixy API JS SDK

Installation

npm i navixy-js-sdk -s

Usage:

With client login and password:

const API = new Navixy.Api({
      user:{
         login:'demo@navixy.com',
         password:'demo'
      },
      domain:'demo.navixy.com'
})

API.tracker.list().then(list => console.log(list))
API.request('user/settings').then(settings => console.log(settings))

With hash:

const API = new Navixy.Api({
      user:{
        hash: '<client-key>'
      }
})

API.tracker.list().then(list => console.log(list))

You can change the auth hash dynamically:

const API = new Navixy.Api()

// List of the First Client trackers
API.setHash('<first-client-key>').tracker.list().then(list => console.log(list))

 // List of the Second Client trackers
API.setHash('<second-client-key>').tracker.list().then(list => console.log(list))

You can call any Navixy API requests: (see DOCs)