{"id":15046227,"url":"https://github.com/willin/wqcloud","last_synced_at":"2025-07-29T13:14:13.700Z","repository":{"id":48012047,"uuid":"78194381","full_name":"willin/wqcloud","owner":"willin","description":"腾讯云Node.js Open API SDK（完整版）","archived":false,"fork":false,"pushed_at":"2022-12-06T20:09:38.000Z","size":225,"stargazers_count":16,"open_issues_count":1,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-04-14T04:55:44.007Z","etag":null,"topics":["api","cbs","cdb","cvm","es6","openapi","qcloud","sdk"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/wqcloud","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/willin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-06T09:43:16.000Z","updated_at":"2021-08-11T01:58:39.000Z","dependencies_parsed_at":"2023-01-23T15:01:26.208Z","dependency_job_id":null,"html_url":"https://github.com/willin/wqcloud","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willin%2Fwqcloud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willin%2Fwqcloud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willin%2Fwqcloud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willin%2Fwqcloud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/willin","download_url":"https://codeload.github.com/willin/wqcloud/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219868869,"owners_count":16555600,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","cbs","cdb","cvm","es6","openapi","qcloud","sdk"],"created_at":"2024-09-24T20:52:52.938Z","updated_at":"2024-10-11T04:40:36.819Z","avatar_url":"https://github.com/willin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WQCloud\n\n比官方SDK更好用的腾讯云SDK。\n\n\u003e 已经疯狂得不能用代码行数（总计`66`行，包含空行和debug）来衡量该项目了，代码仅有 `1,489`字节（净化后）。\n\n[![npm](https://img.shields.io/npm/v/wqcloud.svg?style=plastic)](https://npmjs.org/package/wqcloud) [![npm](https://img.shields.io/npm/dm/wqcloud.svg?style=plastic)](https://npmjs.org/package/wqcloud)\n[![npm](https://img.shields.io/npm/dt/wqcloud.svg?style=plastic)](https://npmjs.org/package/wqcloud)\n\nMinimum, Flexible, Scalable.\n\n支持Lazy Require。\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [安装和使用](#%E5%AE%89%E8%A3%85%E5%92%8C%E4%BD%BF%E7%94%A8)\n  - [v2](#v2)\n- [已支持的接口](#%E5%B7%B2%E6%94%AF%E6%8C%81%E7%9A%84%E6%8E%A5%E5%8F%A3)\n  - [云服务器 CVM](#%E4%BA%91%E6%9C%8D%E5%8A%A1%E5%99%A8-cvm)\n  - [云硬盘 CBS](#%E4%BA%91%E7%A1%AC%E7%9B%98-cbs)\n  - [黑石物理服务器 BM](#%E9%BB%91%E7%9F%B3%E7%89%A9%E7%90%86%E6%9C%8D%E5%8A%A1%E5%99%A8-bm)\n  - [弹性伸缩 SCALING](#%E5%BC%B9%E6%80%A7%E4%BC%B8%E7%BC%A9-scaling)\n  - [负载均衡 LB](#%E8%B4%9F%E8%BD%BD%E5%9D%87%E8%A1%A1-lb)\n  - [私有网络 VPC](#%E7%A7%81%E6%9C%89%E7%BD%91%E7%BB%9C-vpc)\n  - [内容分发网络](#%E5%86%85%E5%AE%B9%E5%88%86%E5%8F%91%E7%BD%91%E7%BB%9C)\n  - [数据库 CDB](#%E6%95%B0%E6%8D%AE%E5%BA%93-cdb)\n  - [云解析 CNS](#%E4%BA%91%E8%A7%A3%E6%9E%90-cns)\n  - [数据库 TDSQL](#%E6%95%B0%E6%8D%AE%E5%BA%93-tdsql)\n  - [数据库 SQLSERVER](#%E6%95%B0%E6%8D%AE%E5%BA%93-sqlserver)\n  - [弹性缓存 REDIS](#%E5%BC%B9%E6%80%A7%E7%BC%93%E5%AD%98-redis)\n  - [弹性缓存 CMEM （Memcached）](#%E5%BC%B9%E6%80%A7%E7%BC%93%E5%AD%98-cmem-memcached)\n  - [网络安全 DAYU](#%E7%BD%91%E7%BB%9C%E5%AE%89%E5%85%A8-dayu)\n  - [天御业务安全防护 CSEC](#%E5%A4%A9%E5%BE%A1%E4%B8%9A%E5%8A%A1%E5%AE%89%E5%85%A8%E9%98%B2%E6%8A%A4-csec)\n  - [云监控/自定义监控 MONITOR](#%E4%BA%91%E7%9B%91%E6%8E%A7%E8%87%AA%E5%AE%9A%E4%B9%89%E7%9B%91%E6%8E%A7-monitor)\n  - [云搜 YUNSOU](#%E4%BA%91%E6%90%9C-yunsou)\n  - [文智自然语言处理 WENZHI](#%E6%96%87%E6%99%BA%E8%87%AA%E7%84%B6%E8%AF%AD%E8%A8%80%E5%A4%84%E7%90%86-wenzhi)\n  - [账号相关 TRADE](#%E8%B4%A6%E5%8F%B7%E7%9B%B8%E5%85%B3-trade)\n  - [地域相关 CVM](#%E5%9C%B0%E5%9F%9F%E7%9B%B8%E5%85%B3-cvm)\n  - [点播 VOD](#%E7%82%B9%E6%92%AD-vod)\n  - [及其他未列出的服务](#%E5%8F%8A%E5%85%B6%E4%BB%96%E6%9C%AA%E5%88%97%E5%87%BA%E7%9A%84%E6%9C%8D%E5%8A%A1)\n  - [直播 LVB (wqcloud-video)](#%E7%9B%B4%E6%92%AD-lvb-wqcloud-video)\n- [CHANGELOG](#changelog)\n  - [v5.0.0](#v500)\n  - [v3.0.2](#v302)\n  - [v2.0.2](#v202)\n  - [v2.0.0](#v200)\n  - [v1.0.0](#v100)\n- [License](#license)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n\n## 安装和使用\n\n国际惯例：\n\n```bash\nnpm install wqcloud --save\n# Node.js 7.6.0之前的版本请安装 v2.x.x版本\nnpm install wqcloud@2.1.4 --save\n```\n\n公共参数：\n\n```js\nvar options = {\n  SecretId: '',\n  SecretKey: '',\n  // 不填，每次请求都会自动重新生成\n  // Signature: '',\n  Nonce: parseInt(Math.random() * 999999, 10),\n  Timestamp: parseInt(new Date() / 1000, 10)\n};\n```\n\nES5:\n\n```js\nvar WQCLOUD = require('wqcloud');\nvar trade = WQCLOUD.TRADE(options);\ntrade.DescribeUserInfo().then(function(instances){\n  // xxxx\n});\n```\n\nES7:\n\n```js\nconst {TRADE} = require('wqcloud');\nconst trade = TRADE(options);\n// Within Async Func\n(async() =\u003e {\n  const userInfo = await trade.DescribeUserInfo();\n  // xxxx\n})();\n```\n\n### v2\n\n默认使用的版本是 v3， 如果需要使用 V2 参考：\n\nES5:\n\n```js\nvar WQCLOUD = require('wqcloud');\nvar trade = WQCLOUD.V2.TRADE(options);\ntrade.DescribeUserInfo().then(function(instances){\n  // xxxx\n});\n```\n\nES7:\n\n```js\nconst {V2:{ TRADE }} = require('wqcloud');\nconst trade = TRADE(options);\n// Within Async Func\n(async() =\u003e {\n  const userInfo = await trade.DescribeUserInfo();\n  // xxxx\n})();\n```\n\n\n## 已支持的接口\n\n### 云服务器 CVM\n\nAPI文档参考：\u003chttps://www.qcloud.com/document/api/213/568\u003e\n\n查询可用区示例：\n\n```js\nconst WQCLOUD = require('wqcloud');\n\nconst example = WQCLOUD.CVM({\n  SecretId: 'xxxx',\n  SecretKey: 'xxxx'\n});\n\nexample.DescribeAvailabilityZones({\n  Region: 'gz'\n}).then((data) =\u003e {\n  console.log(data);\n});\n```\n\n### 云硬盘 CBS\n\nAPI文档参考：\u003chttps://www.qcloud.com/document/api/362/2445\u003e\n\n查询价格示例：\n\n```js\nconst example = WQCLOUD.CBS({\n  SecretId: 'xxxx',\n  SecretKey: 'xxxx'\n});\n\nexample.InquiryStoragePrice({\n  inquiryType: 'create',\n  storageType: 'cloudBasic',\n  storageSize: 100,\n  goodsNum: 1,\n  period: 1,\n  payMode: 'prePay'\n}).then((data) =\u003e {\n  console.log(data);\n});\n```\n\n### 黑石物理服务器 BM\n\nAPI文档参考：\u003chttps://www.qcloud.com/document/api/386/6628\u003e\n\n查询可用区示例：\n\n```js\nconst example = WQCLOUD.BM({\n  SecretId: 'xxx',\n  SecretKey: 'xxx'\n});\n\nexample.DescribeRegions().then((data) =\u003e {\n  console.log(data);\n});\n```\n\n### 弹性伸缩 SCALING\n\nAPI文档参考：\u003chttps://www.qcloud.com/document/api/377/3170\u003e\n\n查询弹性伸缩组示例：\n\n```js\nconst example = WQCLOUD.SCALING({\n  SecretId: 'xxxx',\n  SecretKey: 'xxxx'\n});\n\nexample.DescribeScalingGroup().then((data) =\u003e {\n  console.log(data);\n});\n```\n\n### 负载均衡 LB\n\nAPI文档参考： \u003chttps://www.qcloud.com/document/api/214/888\u003e\n\n查询价格示例：\n\n```js\nconst example = WQCLOUD.LB({\n  SecretId: 'xxxx',\n  SecretKey: 'xxxx'\n});\n\nexample.InquiryLBPrice({\n  loadBalancerType: 2\n}).then((data) =\u003e {\n  console.log(data);\n});\n```\n\n### 私有网络 VPC\n\nAPI文档参考： \u003chttps://www.qcloud.com/document/api/215/908\u003e\n\n查询私有网络列表示例：\n\n```js\nconst example = WQCLOUD.VPC({\n  SecretId: 'xxxx',\n  SecretKey: 'xxxx'\n});\n\nexample.DescribeVpcEx().then((data) =\u003e {\n  console.log(data);\n});\n```\n\n### 内容分发网络\n\nAPI文档参考： \u003chttps://www.qcloud.com/document/api/228/1722\u003e\n\n查询所有域名信息示例：\n\n```js\nconst example = WQCLOUD.CDN({\n  SecretId: 'xxxx',\n  SecretKey: 'xxxx'\n});\n\nexample.DescribeCdnHosts().then((data) =\u003e {\n  console.log(data);\n});\n```\n\n### 数据库 CDB\n\nAPI文档参考： \u003chttps://www.qcloud.com/document/api/236/1209\u003e\n\n### 云解析 CNS\n\n即`DNSPOD`服务。\n\n\u003e 不得不说，DNSPOD是我见过最烂的服务商，客服电话永远打不通。交钱的是大爷，想要霸占别人域名只需要购买VIP服务即可，域名主人就别再想用DNSPOD的免费服务了。呵呵哒~\n\n\u003e 个人意见，强烈推荐参考。\n\nAPI文档参考： \u003chttps://www.qcloud.com/document/api/302/4031\u003e\n\n### 数据库 TDSQL\n\nAPI文档参考： \u003chttps://www.qcloud.com/document/api/237/2246\u003e\n\n### 数据库 SQLSERVER\n\nAPI文档参考：\u003chttps://www.qcloud.com/document/api/238/6430\u003e\n\n### 弹性缓存 REDIS\n\nAPI文档参考： \u003chttps://www.qcloud.com/document/api/239/1748\u003e\n\n### 弹性缓存 CMEM （Memcached）\n\nAPI文档参考： \u003chttps://www.qcloud.com/document/api/241/1762\u003e\n\n### 网络安全 DAYU\n\nAPI文档参考： \u003chttps://www.qcloud.com/document/api/297/2314\u003e\n\n### 天御业务安全防护 CSEC\n\nAPI文档参考： \u003chttps://www.qcloud.com/document/api/295/1773\u003e\n\n### 云监控/自定义监控 MONITOR\n\nAPI文档参考： \u003chttps://www.qcloud.com/document/api/397/1785\u003e\n\n### 云搜 YUNSOU\n\nAPI文档参考： \u003chttps://www.qcloud.com/document/api/270/1989\u003e\n\n### 文智自然语言处理 WENZHI\n\nAPI文档参考： \u003chttps://www.qcloud.com/document/api/271/2049\u003e\n\n### 账号相关 TRADE\n\nAPI文档参考： \u003chttps://www.qcloud.com/document/api/378/4367\u003e\n\n获取账户余额示例：\n\n```js\nconst {TRADE} = require('wqcloud');\n// const TRADE = require('wqcloud').TRADE;\n\nconst trade = TRADE({\n  SecretId: 'xxxxx',\n  SecretKey: 'xxxx'\n});\n// Within Async Func\n(async() =\u003e {\n  const balance = await trade.describeAccountBalance();\n  console.log(balance);\n})();\n```\n### 地域相关 CVM\n\nAPI文档参考： \u003chttps://www.qcloud.com/document/api/558/7758\u003e\n\n### 点播 VOD\n\nAPI文档参考： \u003chttps://www.qcloud.com/document/product/266/7788\u003e\n\n### 及其他未列出的服务\n\n基本涵盖所有, 只要检查 API接口访问地址是否类似这样的格式 `https://${service}.api.qcloud.com/v2/index.php` 即可.\n\n### 直播 LVB (wqcloud-video)\n\n参考项目: \u003chttps://github.com/AirDwing/wqcloud-video\u003e\n\n## CHANGELOG\n\n### v5.0.0\n\n2018-11-28\n\n支持 v3 接口。\n\n### v3.0.2\n\n2017-05-11\n\n更新了签名算法，进一步优化代码，将代码行数缩减到82行（含空行）。\n\n### v2.0.2\n\n2017-01-06\n\n从 `waliyun` 阿里云SDK修改适配到 QCloud\n\n### v2.0.0\n\n2016-09-06\n\n* 使用元编程方式进行重构，减少重复代码和`Action`限制；\n* 更新文档链接。\n\n### v1.0.0\n\n2016-05-16 解决了签名偶发错误的问题。\n\n## License\n\nMIT\n\n通过支付宝捐赠：\n\n![qr](https://cloud.githubusercontent.com/assets/1890238/15489630/fccbb9cc-2193-11e6-9fed-b93c59d6ef37.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillin%2Fwqcloud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwillin%2Fwqcloud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillin%2Fwqcloud/lists"}