Node.js client for Build API v4.
This package deprecates https://www.npmjs.com/package/imp-api.
npm i -g imp-build-api-v4
Node.js 4.0+ is required.
BuildAPIClient:
(property)
string
Gets/sets Build API key.
(property)
boolean
Enables/disables debug output.
.listDevices([name], [deviceId], [modelId])
{Promise}
.getDevice(deviceId)
.updateDevice(deviceId, [name], [modelId])
.restartDevice(deviceId)
.listModels([name])
.createModel(name)
.deleteModel(modelId)
.getModel(modelId)
.updateModel(modelId, [name])
.restartModel(modelId)
.listRevisions(modelId, [since], [until], [buildMin], [buildMax])
.createRevision(modelId, [deviceCode], [agentCode], [releaseNotes])
.getRevision(modelId, buildNumber)
.getDeviceLogs(deviceId, [since])
.streamDeviceLogs(deviceId, callback)
const BuildAPIClient = require('imp-build-api-v4');
let client = new BuildAPIClient();
client.apiKey = '<your Build API key>';
// print list of devices
client.listDevices()
.then((res) => {
console.log('Devices:', res.devices);
})
.catch(console.error);