const HoldCloud = require('holdcloud-sdk');
const holdcloud = new HoldCloud(username, password, baseUrl);
/**
* @param {String} projectId project id
* @return {array} list
*/
holdcloud.listUnionservices(projectId);
/**
* @param {String}} project project id
* @param {Object} options app param
* @return {integer} app id
*/
holdcloud.createContainerApp(projectId, options);
/**
* @param {integer} appId app id
* @param {Object} options instance param
* @return {Object} {}
*/
holdcloud.createContainerAppInstances(appId);
/**
* @param {string} projectId project Id
* @param {string} name container name
* @return {object} {code: 400, id: 233} || {code: 200, id: null}
*/
holdcloud.checkContainerappsName(projectId, name);
/**
* @param {integer} appId 服务 id
* @return {Object} {state: "Creating"}
*/
holdcloud.getContainerAppState(appId);
/**
* @param {integer} appId [app id]
*/
holdcloud.restartContainerApp(appId);
/**
* @param {integer} appId [app id]
*/
holdcloud.destroyContainerApp(appId);
/test/holdcloud.test.js
,
const username = '**@gmail.com';
const password = '*****';
const baseUrl = 'https://console.holdcloud.com/api/v1';
const projectId = 89;
const appId = 133;
npm run test