npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

tencentcloud-sdk-nodejs-intl-en

v3.0.1078

Published

腾讯云 API NODEJS SDK

Downloads

14,147

Readme

Overview

Welcome to Tencent Cloud Software Development Kit (SDK) 3.0, a companion tool for the TencentCloud API 3.0 platform. Currently supported products include CVM, VPC, and CBS. All Tencent Cloud services and products will be connected to it in the future. The new SDK version is unified and features the same SDK usage, API call methods, error codes, and returned packet formats for different languages. Tencent Cloud SDK for Node.js helps Node.js developers debug and use TencentCloud APIs with ease. This document describes Tencent Cloud SDK for Node.js and how to quickly use it with code examaples provided.

Dependent Environment

  1. NODEJS 7.10.1 or higher
  2. Activate your product in the Tencent Cloud Console
  3. Get the SecretID, SecretKey, and endpoint. The general format of endpoint is \*.tencentcloudapi.com. For example, the endpoint of CVM is cvm.tencentcloudapi.com. For more information, please see the documentation of the specified product.

Installation

Before installing Tencent Cloud SDK for Node.js and using TencentCloud API, apply for security credentials in the Tencent Cloud Console. Security credential consists of SecretID and SecretKey. SecretID is for identifying the API requester. SecretKey is a key used for signature string encryption and authentication by the server. Please keep your SecretKey private and do not disclose it to others.

Installing via npm

Installing via npm is the recommended way to use the SDK for Node.js. npm is a package manager for Node.js. For more information, please visit npm's official website.

  1. Execute the following installation command:

    npm install tencentcloud-sdk-nodejs-intl-en --save

  2. Import the corresponding module code in your code. For more information, please see the example.

Installing via source package

  1. Go to the Github code hosting page to download the source code package.
  2. Decompress the source package to an appropriate location in your project.
  3. Import the corresponding module code into your code. For more information, please see the example.

Example

const tencentcloud = require("../../../../tencentcloud-sdk-nodejs-intl-en");

// Import the client models of the corresponding product module.
const CvmClient = tencentcloud.cvm.v20170312.Client;
const models = tencentcloud.cvm.v20170312.Models;

const Credential = tencentcloud.common.Credential;

// Instantiate an authentication object. The Tencent Cloud account `secretId` and `secretKey` need to be passed in as the input parameters
let cred = new Credential("secretId", "secretKey");

// Instantiate the client object of the requested product (with CVM as an example)
let client = new CvmClient(cred, "ap-shanghai");

// Instantiate a request object
let req = new models.DescribeInstancesRequest();

// Call the API you want to access through the client object. You need to pass in the request object and the response callback function
client.DescribeInstances(req, function(err, response) {
    // The request is returned exceptionally, and the exception information is printed
    if (err)
        console.log(err);
        return;
    }
    // The request is returned normally, and the response object is printed
    console.log(response.to_json_string());
});

More examples

For more examples, please go to the examples directory.

Relevant Configuration

Proxy

If there is a proxy in your environment, you need to set the system environment variable https_proxy; otherwise, it may not be called normally, and a connection timeout exception will be thrown.

Legacy SDK

We recommend using the new version of the SDK for NODE.js. If you have to use a legacy SDK, please go to the GitHub repository to download it.