Tencent Qcloud API SDK for node.js
qcloudapi-sdk
是腾讯云 API 2.0 的 node.js SDK 工具包.
安装
npm i qcloudapi-sdk --save
使用
- 使用之前请在腾讯云的云 API 控制台中创建自己的安全凭证(SecretId 和 SecretKey). SecretKey 要严格保管, 避免泄露.
- 安装并引入本 SDK.
示例
var Capi = require('qcloudapi-sdk')
var capi = new Capi({
SecretId: 'Your SecretId here',
SecretKey: 'Your SecretKey here',
serviceType: 'account'
})
capi.request({
Region: 'gz',
Action: 'DescribeProject',
otherParam: 'otherParam'
}, function(error, data) {
console.log(data)
})
capi.request({
Region: 'gz',
Action: 'DescribeInstances',
otherParam: 'otherParam'
}, {
serviceType: 'cvm'
}, function(error, data) {
console.log(data)
})
var qs = capi.generateQueryString({
Region: 'gz',
Action: 'DescribeInstances',
otherParam: 'otherParam'
}, {
serviceType: 'cvm'
})
SDK API
请访问 api.md
资源