# qcloudapi-sdk

> 腾讯云 API SDK for node.js

Latest version **0.2.1** (published 2018-10-29) · Apache 2.0 license · 0 weekly downloads

## Install

```sh
npm install qcloudapi-sdk
pnpm add qcloudapi-sdk
yarn add qcloudapi-sdk
bun add qcloudapi-sdk
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2018-10-29 |
| First published | 2015-09-29 |
| Weekly downloads | 0 |
| License | Apache 2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 28.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | justan |
| Maintainers | cyrilluce, justan, miusuncle |
| Keywords | qcloud, 腾讯云, api, sdk |

## Links

- npm: https://www.npmjs.com/package/qcloudapi-sdk
- npm.io page: https://npm.io/package/qcloudapi-sdk

## Dependencies (3)

- [dot-qs](https://npm.io/package/dot-qs.md) ^0.2.0
- [request](https://npm.io/package/request.md) >= 2.33.0
- [object-assign](https://npm.io/package/object-assign.md) ^3.0.0

## Recent versions

- 0.2.1 (latest) — 2018-10-29
- 0.2.0 — 2018-07-31
- 0.1.6 — 2018-01-12
- 0.1.5 — 2016-10-18
- 0.1.4 — 2016-02-01
- 0.1.3 — 2015-11-06
- 0.1.2 — 2015-10-23
- 0.1.1 — 2015-09-30
- 0.1.0 — 2015-09-29

## README

# Tencent Qcloud API SDK for node.js

`qcloudapi-sdk` 是[腾讯云 API 2.0/3.0](https://www.qcloud.com/doc/api) 的 node.js SDK 工具包.

## 安装

```bash
npm i qcloudapi-sdk --save
```

## 使用

1. 使用之前请在腾讯云的[云 API 控制台](https://console.qcloud.com/capi)中创建自己的安全凭证(SecretId 和 SecretKey). SecretKey 要严格保管, 避免泄露.
2. 安装并引入本 SDK.

## 示例

```js
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",
    otherParam1: "otherParam1",
    otherParam2: "otherParam2"
  },
  function(error, data) {
    console.log(data);
  }
);

//传入配置以覆盖默认项
capi.request(
  {
    Region: "gz",
    Action: "DescribeInstances",
    otherParam1: "otherParam1",
    otherParam2: "otherParam2"
  },
  {
    serviceType: "cvm"
  },
  function(error, data) {
    console.log(data);
  }
);

//生成 querystring
var qs = capi.generateQueryString(
  {
    Region: "gz",
    Action: "DescribeInstances",
    otherParam1: "otherParam1",
    otherParam2: "otherParam2"
  },
  {
    serviceType: "cvm"
  }
);
//'Region=gz&SecretId=&Timestamp=1449461969&Nonce=20874&Action=DescribeInstances&otherParam1=otherParam1&otherParam2=otherParam2&Signature=r%2Fa9nqMxEIn5RsMjqmIksQ5XcYc%3D'
```

## SDK API

请访问 [api.md](./api.md)

## 资源

- [API 列表](https://www.qcloud.com/doc/api)

---
_Source: https://npm.io/package/qcloudapi-sdk · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
