All Projects → aliyun → Openapi Core Nodejs Sdk

aliyun / Openapi Core Nodejs Sdk

OpenAPI POP core SDK for Node.js

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Openapi Core Nodejs Sdk

aliyun-openapi-sdk-net-core
aliyun open api sdk for .net core 2.0
Stars: ✭ 17 (-89.1%)
Mutual labels:  openapi, aliyun
Aliyun Sdk Js
阿里云 SDK for Javascript,支持在浏览器和 Nodejs 环境使用,支持大部分阿里云服务。
Stars: ✭ 727 (+366.03%)
Mutual labels:  openapi, aliyun
Waliyun
阿里云Node.js Open API SDK(完整版)
Stars: ✭ 40 (-74.36%)
Mutual labels:  openapi, aliyun
Restful React
A consistent, declarative way of interacting with RESTful backends, featuring code-generation from Swagger and OpenAPI specs 🔥
Stars: ✭ 1,814 (+1062.82%)
Mutual labels:  openapi
Rapipdf
PDF generation from OpenAPI / Swagger Spec
Stars: ✭ 132 (-15.38%)
Mutual labels:  openapi
Express Oas Generator
OpenAPI (Swagger) specification generator for ExpressJS applications
Stars: ✭ 138 (-11.54%)
Mutual labels:  openapi
Hikaku
A library that tests if the implementation of a REST-API meets its specification.
Stars: ✭ 154 (-1.28%)
Mutual labels:  openapi
Angular Swagger Ui
An angularJS implementation of Swagger UI
Stars: ✭ 131 (-16.03%)
Mutual labels:  openapi
Swagger meqa
Auto generate and run tests using swagger/OpenAPI spec, no coding needed
Stars: ✭ 151 (-3.21%)
Mutual labels:  openapi
Alispot
自动创建阿里云抢占式实例,并启用网络加速
Stars: ✭ 139 (-10.9%)
Mutual labels:  aliyun
Swaggerassertions
Assert your API requests and responses match with your swagger definition
Stars: ✭ 137 (-12.18%)
Mutual labels:  openapi
Aliyun Emapreduce Datasources
Extended datasource support for Spark/Hadoop on Aliyun E-MapReduce.
Stars: ✭ 132 (-15.38%)
Mutual labels:  aliyun
Swagger Axios Codegen
swagger client to use axios and typescript
Stars: ✭ 143 (-8.33%)
Mutual labels:  openapi
Graphql Mesh
GraphQL Mesh — Query anything, run anywhere
Stars: ✭ 2,114 (+1255.13%)
Mutual labels:  openapi
Aliyun Ons
☁️ SDK of Node.js for Aliyun ONS. 🚀
Stars: ✭ 151 (-3.21%)
Mutual labels:  aliyun
Mentorship Backend
Mentorship System is an application that matches women in tech to mentor each other, on career development, through 1:1 relations during a certain period of time. This is the backend of this system.
Stars: ✭ 132 (-15.38%)
Mutual labels:  openapi
Slack Api Specs
Open API specifications for platform products by Slack
Stars: ✭ 148 (-5.13%)
Mutual labels:  openapi
Prance
Resolving Swagger/OpenAPI 2.0 and 3.0 Parser
Stars: ✭ 133 (-14.74%)
Mutual labels:  openapi
Aliddns
aliyun ddns for golang【阿里云DDNS服务,用来将自己的动态IP同步到自己的域名解析服务器,安装方便,配置简单,默认支持Linux和MacOS以后台服务方式持续运行】
Stars: ✭ 136 (-12.82%)
Mutual labels:  aliyun
Gemini
Model Driven REST framework to automatically generate CRUD APIs
Stars: ✭ 138 (-11.54%)
Mutual labels:  openapi

@alicloud/pop-core

The core SDK of POP API.

NPM version build status codecov

Installation

Install it and write into package.json dependences.

$ npm install @alicloud/pop-core -S

Prerequisite

Node.js >= 8.x

Notes

You must know your AK(accessKeyId/accessKeySecret), and the cloud product's endpoint and apiVersion.

For example, The ECS OpenAPI(https://help.aliyun.com/document_detail/25490.html), the API version is 2014-05-26.

And the endpoint list can be found at here, the center endpoint is ecs.aliyuncs.com. Add http protocol http or https, should be http://ecs.aliyuncs.com/.

Online Demo

API Explorer provides the ability to call the cloud product OpenAPI online, and dynamically generate SDK Example code and quick retrieval interface, which can significantly reduce the difficulty of using the cloud API. It is highly recommended.

Usage

The RPC style client:

var RPCClient = require('@alicloud/pop-core').RPCClient;

var client = new RPCClient({
  accessKeyId: '<accessKeyId>',
  accessKeySecret: '<accessKeySecret>',
  endpoint: '<endpoint>',
  apiVersion: '<apiVersion>'
});

// => returns Promise
client.request(action, params);
// co/yield, async/await

// options
client.request(action, params, {
  timeout: 3000, // default 3000 ms
  formatAction: true, // default true, format the action to Action
  formatParams: true, // default true, format the parameter name to first letter upper case
  method: 'GET', // set the http method, default is GET
  headers: {}, // set the http request headers
});

The ROA style client:

var ROAClient = require('@alicloud/pop-core').ROAClient;

var client = new ROAClient({
  accessKeyId: '<accessKeyId>',
  accessKeySecret: '<secretAccessKey>',
  endpoint: '<endpoint>',
  apiVersion: '<apiVersion>'
});

// => returns Promise
// request(HTTPMethod, uriPath, queries, body, headers, options);
// options => {timeout}
client.request('GET', '/regions');
// co/yield, async/await

Custom opts

We offer two ways to customize request opts.

One way is passing opts through the Client constructor. You should treat opts passed through the constructor as default custom opts, because all requests will use this opts.

var client = new RPCClient({
  accessKeyId: '<accessKeyId>',
  accessKeySecret: '<accessKeySecret>',
  endpoint: '<endpoint>',
  apiVersion: '<apiVersion>',
  opts: {
    timeout: 3000
  }
});

Another way is passing opts through the function's parameter. You should use this way when you want to just pass opts in specific functions.

client.request(action, params, {
  timeout: 3000
});

When both ways are used, opts will be merged. But for the opt with the same key, the opts provided by the function parameter overrides the opts provided by the constructor.

Http Proxy Support

var tunnel = require('tunnel-agent');

var RPCClient = require('@alicloud/pop-core').RPCClient;

var client = new RPCClient({
  accessKeyId: '<accessKeyId>',
  accessKeySecret: '<accessKeySecret>',
  endpoint: '<endpoint>',
  apiVersion: '<apiVersion>'
});


client.request(action, params, {
  agent: tunnel.httpOverHttp({
    proxy: {
      host: 'host',
      port: port
    }
  });
});

License

The MIT License

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].