@alicloud/pop-core
The core SDK of POP API.
Installation
Install it and write into package.json dependences.
$ npm install @alicloud/pop-core -S
Prerequisite
Node.js >= 6.x
Usage
The RPC style client:
var RPCClient = require('@alicloud/pop-core').RPCClient;
var client = new RPCClient({
accessKeyId: '<accessKeyId>',
secretAccessKey: '<secretAccessKey>',
endpoint: '<endpoint>',
apiVersion: '<apiVersion>'
});
client.request(action, params);
The ROA style client:
var ROAClient = require('@alicloud/pop-core').ROAClient;
var client = new ROAClient({
accessKeyId: '<accessKeyId>',
accessKeySecret: '<secretAccessKey>',
endpoint: '<endpoint>',
apiVersion: '<apiVersion>'
});
client.request('GET', '/regions');
License
The MIT License