All Projects → willin → wqcloud

willin / wqcloud

Licence: MIT license
腾讯云Node.js Open API SDK(完整版)

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to wqcloud

Openapi Backend
Build, Validate, Route, Authenticate and Mock using OpenAPI
Stars: ✭ 216 (+1250%)
Mutual labels:  openapi
Grpc Swagger
Debugging gRPC application with swagger-ui.
Stars: ✭ 242 (+1412.5%)
Mutual labels:  openapi
gulp-upload-qcloud
腾讯云 cos 静态资源上传 gulp 插件
Stars: ✭ 18 (+12.5%)
Mutual labels:  qcloud
Openapi Codegen
OpenAPI 3.0 CodeGen plus Node.js minus the Java and emojis
Stars: ✭ 224 (+1300%)
Mutual labels:  openapi
Kubernetes Json Schema
A set of JSON schemas for various Kubernetes versions, extracted from the OpenAPI definitions
Stars: ✭ 234 (+1362.5%)
Mutual labels:  openapi
Full Stack Fastapi Couchbase
Full stack, modern web application generator. Using FastAPI, Couchbase as database, Docker, automatic HTTPS and more.
Stars: ✭ 243 (+1418.75%)
Mutual labels:  openapi
Openapi Diff
Utility for comparing two OpenAPI specifications.
Stars: ✭ 208 (+1200%)
Mutual labels:  openapi
OpenAPI
A pharo implementation of OpenAPI 3.0.1
Stars: ✭ 20 (+25%)
Mutual labels:  openapi
Mockoon
Mockoon is the easiest and quickest way to run mock APIs locally. No remote deployment, no account required, open source.
Stars: ✭ 3,448 (+21450%)
Mutual labels:  openapi
Php Crud Api
Single file PHP script that adds a REST API to a SQL database
Stars: ✭ 2,904 (+18050%)
Mutual labels:  openapi
Flasgger
Easy OpenAPI specs and Swagger UI for your Flask API
Stars: ✭ 2,825 (+17556.25%)
Mutual labels:  openapi
Django Rest Swagger
Swagger Documentation Generator for Django REST Framework: deprecated
Stars: ✭ 2,553 (+15856.25%)
Mutual labels:  openapi
Api
The Up Banking API Specification
Stars: ✭ 248 (+1450%)
Mutual labels:  openapi
Openapi Comment Parser
⚓️ JSDoc Comments for the OpenAPI Specification
Stars: ✭ 221 (+1281.25%)
Mutual labels:  openapi
openshift-json-schema
A set of JSON schemas for various OpenShift versions, extracted from the OpenAPI definitions
Stars: ✭ 23 (+43.75%)
Mutual labels:  openapi
Generators
API Generator - instantly generate REST and GraphQL APIs (openapi (OAS) 3.0.0)
Stars: ✭ 213 (+1231.25%)
Mutual labels:  openapi
Api Generator
PHP-code generator for Laravel framework, with complete support of JSON-API data format
Stars: ✭ 244 (+1425%)
Mutual labels:  openapi
client-encryption-nodejs
Library for Mastercard API compliant payload encryption/decryption.
Stars: ✭ 20 (+25%)
Mutual labels:  openapi
openapi-boilerplate
📘 Multi-file boilerplate for Open API Specification
Stars: ✭ 280 (+1650%)
Mutual labels:  openapi
Shins
Shins development continues at
Stars: ✭ 250 (+1462.5%)
Mutual labels:  openapi

WQCloud

比官方SDK更好用的腾讯云SDK。

已经疯狂得不能用代码行数(总计66行,包含空行和debug)来衡量该项目了,代码仅有 1,489字节(净化后)。

npm npm npm

Minimum, Flexible, Scalable.

支持Lazy Require。

Table of Contents generated with DocToc

安装和使用

国际惯例:

npm install wqcloud --save
# Node.js 7.6.0之前的版本请安装 v2.x.x版本
npm install [email protected] --save

公共参数:

var options = {
  SecretId: '',
  SecretKey: '',
  // 不填,每次请求都会自动重新生成
  // Signature: '',
  Nonce: parseInt(Math.random() * 999999, 10),
  Timestamp: parseInt(new Date() / 1000, 10)
};

ES5:

var WQCLOUD = require('wqcloud');
var trade = WQCLOUD.TRADE(options);
trade.DescribeUserInfo().then(function(instances){
  // xxxx
});

ES7:

const {TRADE} = require('wqcloud');
const trade = TRADE(options);
// Within Async Func
(async() => {
  const userInfo = await trade.DescribeUserInfo();
  // xxxx
})();

v2

默认使用的版本是 v3, 如果需要使用 V2 参考:

ES5:

var WQCLOUD = require('wqcloud');
var trade = WQCLOUD.V2.TRADE(options);
trade.DescribeUserInfo().then(function(instances){
  // xxxx
});

ES7:

const {V2:{ TRADE }} = require('wqcloud');
const trade = TRADE(options);
// Within Async Func
(async() => {
  const userInfo = await trade.DescribeUserInfo();
  // xxxx
})();

已支持的接口

云服务器 CVM

API文档参考:https://www.qcloud.com/document/api/213/568

查询可用区示例:

const WQCLOUD = require('wqcloud');

const example = WQCLOUD.CVM({
  SecretId: 'xxxx',
  SecretKey: 'xxxx'
});

example.DescribeAvailabilityZones({
  Region: 'gz'
}).then((data) => {
  console.log(data);
});

云硬盘 CBS

API文档参考:https://www.qcloud.com/document/api/362/2445

查询价格示例:

const example = WQCLOUD.CBS({
  SecretId: 'xxxx',
  SecretKey: 'xxxx'
});

example.InquiryStoragePrice({
  inquiryType: 'create',
  storageType: 'cloudBasic',
  storageSize: 100,
  goodsNum: 1,
  period: 1,
  payMode: 'prePay'
}).then((data) => {
  console.log(data);
});

黑石物理服务器 BM

API文档参考:https://www.qcloud.com/document/api/386/6628

查询可用区示例:

const example = WQCLOUD.BM({
  SecretId: 'xxx',
  SecretKey: 'xxx'
});

example.DescribeRegions().then((data) => {
  console.log(data);
});

弹性伸缩 SCALING

API文档参考:https://www.qcloud.com/document/api/377/3170

查询弹性伸缩组示例:

const example = WQCLOUD.SCALING({
  SecretId: 'xxxx',
  SecretKey: 'xxxx'
});

example.DescribeScalingGroup().then((data) => {
  console.log(data);
});

负载均衡 LB

API文档参考: https://www.qcloud.com/document/api/214/888

查询价格示例:

const example = WQCLOUD.LB({
  SecretId: 'xxxx',
  SecretKey: 'xxxx'
});

example.InquiryLBPrice({
  loadBalancerType: 2
}).then((data) => {
  console.log(data);
});

私有网络 VPC

API文档参考: https://www.qcloud.com/document/api/215/908

查询私有网络列表示例:

const example = WQCLOUD.VPC({
  SecretId: 'xxxx',
  SecretKey: 'xxxx'
});

example.DescribeVpcEx().then((data) => {
  console.log(data);
});

内容分发网络

API文档参考: https://www.qcloud.com/document/api/228/1722

查询所有域名信息示例:

const example = WQCLOUD.CDN({
  SecretId: 'xxxx',
  SecretKey: 'xxxx'
});

example.DescribeCdnHosts().then((data) => {
  console.log(data);
});

数据库 CDB

API文档参考: https://www.qcloud.com/document/api/236/1209

云解析 CNS

DNSPOD服务。

不得不说,DNSPOD是我见过最烂的服务商,客服电话永远打不通。交钱的是大爷,想要霸占别人域名只需要购买VIP服务即可,域名主人就别再想用DNSPOD的免费服务了。呵呵哒~

个人意见,强烈推荐参考。

API文档参考: https://www.qcloud.com/document/api/302/4031

数据库 TDSQL

API文档参考: https://www.qcloud.com/document/api/237/2246

数据库 SQLSERVER

API文档参考:https://www.qcloud.com/document/api/238/6430

弹性缓存 REDIS

API文档参考: https://www.qcloud.com/document/api/239/1748

弹性缓存 CMEM (Memcached)

API文档参考: https://www.qcloud.com/document/api/241/1762

网络安全 DAYU

API文档参考: https://www.qcloud.com/document/api/297/2314

天御业务安全防护 CSEC

API文档参考: https://www.qcloud.com/document/api/295/1773

云监控/自定义监控 MONITOR

API文档参考: https://www.qcloud.com/document/api/397/1785

云搜 YUNSOU

API文档参考: https://www.qcloud.com/document/api/270/1989

文智自然语言处理 WENZHI

API文档参考: https://www.qcloud.com/document/api/271/2049

账号相关 TRADE

API文档参考: https://www.qcloud.com/document/api/378/4367

获取账户余额示例:

const {TRADE} = require('wqcloud');
// const TRADE = require('wqcloud').TRADE;

const trade = TRADE({
  SecretId: 'xxxxx',
  SecretKey: 'xxxx'
});
// Within Async Func
(async() => {
  const balance = await trade.describeAccountBalance();
  console.log(balance);
})();

地域相关 CVM

API文档参考: https://www.qcloud.com/document/api/558/7758

点播 VOD

API文档参考: https://www.qcloud.com/document/product/266/7788

及其他未列出的服务

基本涵盖所有, 只要检查 API接口访问地址是否类似这样的格式 https://${service}.api.qcloud.com/v2/index.php 即可.

直播 LVB (wqcloud-video)

参考项目: https://github.com/AirDwing/wqcloud-video

CHANGELOG

v5.0.0

2018-11-28

支持 v3 接口。

v3.0.2

2017-05-11

更新了签名算法,进一步优化代码,将代码行数缩减到82行(含空行)。

v2.0.2

2017-01-06

waliyun 阿里云SDK修改适配到 QCloud

v2.0.0

2016-09-06

  • 使用元编程方式进行重构,减少重复代码和Action限制;
  • 更新文档链接。

v1.0.0

2016-05-16 解决了签名偶发错误的问题。

License

MIT

通过支付宝捐赠:

qr

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].