All Projects → willin → Waliyun

willin / Waliyun

阿里云Node.js Open API SDK(完整版)

Programming Languages

javascript
184084 projects - #8 most used programming language
es6
455 projects

Projects that are alternatives of or similar to Waliyun

Aliyun Sdk Js
阿里云 SDK for Javascript,支持在浏览器和 Nodejs 环境使用,支持大部分阿里云服务。
Stars: ✭ 727 (+1717.5%)
Mutual labels:  openapi, ecs, aliyun, rds, oss, sdk, cdn
Aliyungo
Go SDK for Aliyun (Alibaba Cloud) - Golang API for ECS, OSS, DNS, SLB, RDS, RAM, MNS, STS, SLS, MQ, Push, OpenSearch, DM, Container Service etc.
Stars: ✭ 756 (+1790%)
Mutual labels:  ecs, aliyun, rds, oss, sdk
Alibaba Cloud Sdk Go
Alibaba Cloud SDK for Go
Stars: ✭ 876 (+2090%)
Mutual labels:  ecs, aliyun, rds, sdk
Ali Oss
Aliyun OSS(open storage service) JavaScript SDK for the browser and Node.js
Stars: ✭ 1,579 (+3847.5%)
Mutual labels:  aliyun, oss, sdk
Openapi Generator
OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
Stars: ✭ 10,634 (+26485%)
Mutual labels:  api, openapi, sdk
Openapi Sdk Php
Alibaba Cloud SDK for PHP
Stars: ✭ 423 (+957.5%)
Mutual labels:  ecs, aliyun, sdk
Apispec
A pluggable API specification generator. Currently supports the OpenAPI Specification (f.k.a. the Swagger specification)..
Stars: ✭ 831 (+1977.5%)
Mutual labels:  api, openapi
Pix Api
API Pix: a API do Arranjo de Pagamentos Instantâneos Brasileiro.
Stars: ✭ 832 (+1980%)
Mutual labels:  api, openapi
Axios Module
Secure and easy axios integration with Nuxt.js
Stars: ✭ 998 (+2395%)
Mutual labels:  api, proxy
Bbc Rss
BBC iPlayer programmes / Nitro API to RSS adaptor app
Stars: ✭ 10 (-75%)
Mutual labels:  api, proxy
Widdershins
OpenAPI / Swagger, AsyncAPI & Semoasa definitions to (re)Slate compatible markdown
Stars: ✭ 856 (+2040%)
Mutual labels:  api, openapi
Openapi3 Validator
Validator for OpenAPI v3 specs
Stars: ✭ 11 (-72.5%)
Mutual labels:  api, openapi
Api Platform
Create REST and GraphQL APIs, scaffold Jamstack webapps, stream changes in real-time.
Stars: ✭ 7,144 (+17760%)
Mutual labels:  api, openapi
Themoviedb
A node.js module with support for both callbacks and promises to provide access to the TMDb API
Stars: ✭ 5 (-87.5%)
Mutual labels:  api, sdk
Swaddle
Automagically create API clients/wrappers in JavaScript
Stars: ✭ 23 (-42.5%)
Mutual labels:  api, proxy
Pizzly
The simplest, fastest way to integrate your app with an OAuth API 😋
Stars: ✭ 796 (+1890%)
Mutual labels:  api, proxy
Kin Openapi
OpenAPI 3.0 implementation for Go (parsing, converting, validation, and more)
Stars: ✭ 776 (+1840%)
Mutual labels:  api, openapi
Fastapi
FastAPI framework, high performance, easy to learn, fast to code, ready for production
Stars: ✭ 39,588 (+98870%)
Mutual labels:  api, openapi
Aeris Ios Library
Contains a demo project utilizing the AerisWeather SDK for iOS to help you get started with using our library.
Stars: ✭ 21 (-47.5%)
Mutual labels:  api, sdk
Fusio
Open source API management platform
Stars: ✭ 946 (+2265%)
Mutual labels:  api, openapi

WAliyun

比官方SDK更好用的阿里云SDK。

npm npm npm

Minimum, Flexible, Scalable.

支持Lazy Require。

Table of Contents generated with DocToc

安装和使用

国际惯例:

npm install waliyun --save

公共参数:

var options = {
  AccessKeyId: 'xxxx-xxxx-xxxx-xxxx',
  AccessKeySecret: 'xxxx-xxxx-xxxx-xxxx',
  // 选填,不同接口类型注意版本日期,2.0.0之后版本会带上默认版本,但可能会落后于最新,需要注意
  Version: '2014-05-26',
  // 选填
  SignatureMethod: 'HMAC-SHA1',
  Format: 'json',
  SignatureVersion: '1.0',
  // 不填,每次请求都会自动重新生成
  SignatureNonce: Math.random(),
  Timestamp: new Date().toISOString()
};

ES5:

var WALIYUN = require('waliyun');
var ecs = WALIYUN.ECS(options);
ecs.describeInstances({
  RegionId: 'cn-hangzhou'
}).then(function(instances){
  // xxxx
});

ES7:

import {ECS} from 'waliyun';
const ecs = ECS(options);
// Within Async Func
(async() => {
  const instances = await ecs.describeInstances({
    RegionId: 'cn-hangzhou'
  });
  // xxxx
});

查看接口对应版本

ES7:

import {ECS} from 'waliyun';
const ecs = ECS(options);
console.log(ecs.version());

已支持的接口

CDN

API文档参考: https://help.aliyun.com/document_detail/27155.html

移动推送 CLOUDPUSH

API文档参考: https://help.aliyun.com/document_detail/30074.html

邮件推送 DM

API文档参考: https://help.aliyun.com/document_detail/29435.html

发送示例:

const { DM } = require('waliyun');

const dm = DM({
  AccessKeyId: 'xxxx',
  AccessKeySecret: 'xxxxx'
});

dm.singleSendMail({
  AccountName: '[email protected]',
  ReplyToAddress: false,
  AddressType: 1,
  ToAddress: '[email protected]',
  FromAlias: '用户名',
  Subject: '注册邮件',
  HtmlBody: '<p>您的注册验证码为:1234</p>'
}).then(data => {
  console.log(data);
}).catch(err => {
  console.log(err);
});

短信服务 SMS

阿里云已停止开通原短信服务(整合在消息服务内)。新开通阿里云短信服务的用户,请参考下方的新短信服务调用示例

发送示例:

const { SMS } = require('waliyun');

const sms = SMS({
  AccessKeyId: 'xxxx',
  AccessKeySecret: 'xxxx'
});

sms.singleSendSMS({
  ParamString: '{"customer":"1234"}',
  RecNum: '13812341234',
  SignName: '您的签名',
  TemplateCode: 'SMS_77778888'
}).then(data => {
  console.log(data);
});

新短信服务 DYSMS

API文档参考: https://help.aliyun.com/document_detail/56189.html

发送示例:

const { DYSMS } = require('waliyun');

const sms = DYSMS({
  AccessKeyId: 'xxxx',
  AccessKeySecret: 'xxxx'
});

sms.sendSms({
  TemplateParam: JSON.stringify({customer: '1234'}),
  PhoneNumbers: mobileNo,
  SignName: '您的签名',
  TemplateCode: 'SMS_77778888'
})

分布式关系型数据库 DRDS

API文档参考: https://help.aliyun.com/document_detail/35276.html

云服务器 ECS

API文档参考: https://help.aliyun.com/document_detail/25485.html

ES7 示例:

import {ECS} from 'waliyun';

(async() => {
  const ces = ECS({
    AccessKeyId: 'xxxx',
    AccessKeySecret: 'xxxx',
    Version: '2014-05-26'
  });
  const data = await ces.describeInstances({
    RegionId: 'cn-hangzhou'
  });
  console.log(data.Instances.Instance);
})();

语音服务 DYVMS

API文档参考: https://help.aliyun.com/document_detail/56190.html

弹性伸缩 ESS

API文档参考: https://help.aliyun.com/document_detail/25925.html

ALIDNS

API文档参考: https://help.aliyun.com/document_detail/29739.html

HTTPDNS

API文档参考: https://help.aliyun.com/document_detail/30122.html

阿里云物联网套件 IOT

API文档参考: https://help.aliyun.com/document_detail/30557.html

ES7 示例:

import {IOT} from 'waliyun';

(async() => {
  const iot = IOT({
    Api:'https://iot.cn-shanghai.aliyuncs.com/',//可不填,默认为https://iot.aliyuncs.com/
    AccessKeyId: 'xxxx',
    AccessKeySecret: 'xxxxx',
    Version: '2016-05-30'
  });
  const data = await iot.sub({
    ProductKey: 'xxxx',
    SubCallback: 'http://xxxx:xxx/',
    'Topic.1': '/ProductKey/Topic'
  });
  console.log(data);
})();

云监控 METRICS

API文档参考: https://help.aliyun.com/document_detail/28616.html

ES7 示例:

import {METRICS} from 'waliyun';

(async() => {
  const metrics = METRICS({
    AccessKeyId: 'xxxxxx',
    AccessKeySecret: 'xxxxxx',
    Version: '2015-10-20',
    RegionId: 'cn-hangzhou'
  });
  const data = await metrics.queryMetric({
    Project: 'acs_rds',
    Metric: 'CpuUsage',
    Period: '300',
    StartTime: new Date() - 60 * 1000 * 1000,
    Dimensions: '{instanceId:\'xxxxxx\'}'
  });
  console.log(data.Datapoints);
})();

媒体转码 MTS

API文档参考: https://help.aliyun.com/document_detail/29212.html

访问控制 RAM

API文档参考: https://help.aliyun.com/document_detail/28672.html

云数据库 RDS

API文档参考: https://help.aliyun.com/document_detail/26226.html

负载均衡 SLB

API文档参考: https://help.aliyun.com/document_detail/27566.html

访问控制 STS

API文档参考: https://help.aliyun.com/document_detail/28756.html

ES5示例:

var WALIYUN = require('waliyun');
var sts = WALIYUN.STS({
  AccessKeyId: 'xxxx',
  AccessKeySecret: 'xxxx',
  Version: '2015-04-01'
});
sts.AssumeRole({
  RoleArn: 'acs🐏:xxxx:role/xxxx',
  RoleSessionName: 'xxxxx'
},'post').then(function(token){
  // xxxx
});

ES7 示例:

import {STS} from 'waliyun';

const sts = STS({
  AccessKeyId: 'xxxx',
  AccessKeySecret: 'xxxx',
  Version: '2015-04-01'
});

(async() => {
  const token = await sts.AssumeRole({
    RoleArn: 'acs🐏:xxxx:role/xxxx',
    RoleSessionName: 'xxxxx'
  },'post');
  // xxxx
})();

容器服务 CS

API文档参考: https://help.aliyun.com/document_detail/26043.html

注意,容器服务版本号停留在:2015-12-15。新版改动较为奇葩,暂不支持。

旧版本方法列表:

[
  'GetClusterList',
  'CreateCluster',
  'DeleteCluster',
  'GetClusterById',
  'GetClusterCerts',
  'UpdateClusterSizeById',
  'ListProjects',
  'CreateProject',
  'RetrieveProject',
  'StartProject',
  'StopProject',
  'UpdateProject',
  'DeleteProject'
]

CHANGELOG

v2.0.0

2016-09-06

  • 使用元编程方式进行重构,减少重复代码和Action限制;
  • 更新文档链接。

v1.0.0

2016-05-16 解决了签名偶发错误的问题。

License

MIT

通过支付宝捐赠:

qr

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