cloudtower-node-sdk
v2.21.0
Published
cloudtower operation api
Maintainers
Readme
Cloudtower Node Sdk
typescript 编写的 Cloudtower SDK。
安装
yarn install cloudtower-node-sdk使用
创建Client并鉴权
import { CloudTowerClient, UserSource } from "cloudtower-node-sdk";
const client = new CloudTowerClient(
{
username: "username",
password: "password",
source: UserSource.LOCAL,
},
{
baseURL: "http://<path-to-tower>/v2/api",
}
);创建实例并请求
const api = new VmApi(client);
const data = await api.getVms({
first: 10,
});
console.log(data);