warehouse.ai-api-client
API client to communicate with warehouse.ai.
Install
npm install warehouse.ai-api-client --save
Usage
const Warehouse = require('warehouse.ai-api-client');
const wrhs = new Warehouse('https://warehouse-instance');
wrhs.builds.get({ env, pkg }, (err, build) => {});
wrhs.releaseLine.get({ pkg, version }, (err, build) => {});
Configuration
There is ton of configuration you can do with your client. While you can just
pass a string
like the above snippet to configure where your wrhs
instance
is hosted, there are a bunch of additional options you can pass as an object:
const wrhs = new Warehouse({
uri: 'https://warehouse-instance',
statusUri: 'https://warehouse-status-instance',
retry: {},
auth: {
type: 'basic',
token: 'myuser:mypass',
encoded: false
},
timeout: 3e4,
strictSSL: false,
concurrency: 10,
dry: false,
builds: {
cache: {
enabled: false
}
},
assets: {
cache: {
enabled: false
}
}
});
Test
npm test