aliyun-gateway-api

aliyun gateway api tools for nodejs

Showing:

Popularity

Downloads/wk

9

GitHub Stars

1

Maintenance

Last Commit

4yrs ago

Contributors

1

Package

Dependencies

3

Size (min+gzip)

215.8KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

aliyun-gateway-api

npm-version travis-ci coverage npm-download

Aliyun gateway api tools for Node.js

Installation

You can install it as dependency with npm.

$ # save into package.json dependencies with -S
$ npm install aliyun-gateway-api -S

Usage

The apiClient authrozied by appid & appsecret.

GET Data

var apiClient = require('aliyun-gateway-api').Client;
var client = new apiClient(appKey, appSecret);

co(function*() {
    const url = 'https://dm-81.data.aliyun.com/rest/160601/ip/getIpInfo.json?ip=210.75.225.254';
    const data = yield client.get(url);

    console.log(JSON.stringify(data));
});

POST Form Data

co(function*() {
    const data = yield client.post({
        url: 'http://aa25c9177bb54cf6a4c99ddad7eabba6-cn-shanghai.alicloudapi.com/checkMobile',
        form: {
            mobile: "15612345678"
        }
    });

    console.log(JSON.stringify(data));
});

POST Json Data

co(function*() {

    const data = yield client.post({
        url: 'http://aa25c9177bb54cf6a4c99ddad7eabba6-cn-shanghai.alicloudapi.com/postjsonMobile',
        json: {
            mobile: "15612345678"
        }
    });

    console.log(JSON.stringify(data));
});

Bugs

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100