1.0.0 • Published 9 years ago
ubiquiti-unifi v1.0.0
ubiquiti-unifi
Library for accessing the unifi network equipment
Install
Currently, the module is written on Node 6, without any transpilers, using the ES2015+ features.
npm install --save ubiquiti-unifiUsage
const ubiquitiUnifi = require('ubiquiti-unifi')
const options = {
username: '',
password: '',
port: 8443,
url: 'https://127.0.0.1',
site: 'default',
ignoreSsl: false
}
ubiquitiUnifi(options)
.then(router =>
Promise.all([router.getAccessPoints(), router.getClients()])
.then(([accessPoints, clients]) => {
console.log(accessPoints, clients)
})API
ubiquitiUnifi(options)
Returns a Promise with the Router API
options
username
Type: string
Username for the Router API
password
Type: string
Password for the Router API
port (default:8443)
Type: number
Port for the Router API
url (default:https://127.0.0.1)
Type: string
URL for the Router API
site (default:default)
Type: string
The site setting for the Router API
ignoreSsl (default:false)
Type: boolean
Ignore SSL warnings, for instance when accessing router API that uses a self signed certificate.
License
MIT © Daniel H Moran