2.0.1 • Published 6 years ago

ninja-rmm-api v2.0.1

Weekly downloads
6
License
ISC
Repository
github
Last release
6 years ago

ninja-rmm-api :: UNMAINTAINED

a node wrapper for the NinjaRMM API

this package is not being maintained at all. if you find it useful, feel free to take over

ninja-rmm-api exposes a generateOptions method that outputs an options Object to be used with request.

Usage

Pass in the API details as an object with at least:

The accessKeyID and secret are provided from the Ninja interface (see documentation).

When generating options for request, pass in an object with at least:

  • method (e.g. GET/PUT/POST/DELETE)
  • resource (e.g. /v1/alerts)

The generateOptions method also supports passing in:

  • contentMd5
  • contentType
  • date

These are optional. The module will take care of the date property automatically if left blank.

Example

const NinjaClient = require('ninja-rmm-api')
const request = require('request')

const ninjaClient = new NinjaClient({
  accessKeyID: 'TF4STGMDR4H7AEXAMPLE',
  secret: 'eh14c4ngchhu6283he03j6o7ar2fcuca0example',
  host: 'http://api.ninjarmm.com',
})

const ninjaReq = ninjaClient.generateOptions({
  method: 'GET',
  resource: '/v1/alerts'
})

request(ninjaReq, (err, response, data) => {
  // ...
})
2.0.1

6 years ago

2.0.0

6 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago