0.1.9 • Published 7 months ago

aliyun-openapi v0.1.9

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

aliyun-openapi

npm build status npm download

Aliyun OpenAPI

Installation

$ npm install aliyun-openapi

Open APIs

  • SMS
  • Email

Usage

SMS

import { AliyunClient, AliyunSmsOpenAPI } from 'aliyun-openapi'

const client = new AliyunClient({
  accessKeyId: 'your_access_key_id',
  accessKeySecret: 'your_access_key_secret',
  version: '2017-05-25',
  endpoint: 'dysmsapi.aliyuncs.com',
})
const openapi = new AliyunSmsOpenAPI(client)

await openapi.send('13812345678', 'TestSigner', 'SMS_12345678', { code: '123456' })

Email

import { AliyunClient, AliyunEmailOpenAPI } from 'aliyun-openapi'

const client = new AliyunClient({
  accessKeyId: 'your_access_key_id',
  accessKeySecret: 'your_access_key_secret',
  version: '2015-11-23',
  endpoint: 'dm.aliyuncs.com',
})
const openapi = new AliyunEmailOpenAPI(client)

await openapi.send('noreply@test.com', 'alice@test.com', 'Verification Code', `<h2>Verification code: 123456<h2>`)

TODO

  • Monorepo
  • Documentation
0.1.9

7 months ago

0.1.8

9 months ago

0.1.7

9 months ago

0.1.6

9 months ago

0.1.5

9 months ago

0.1.4

9 months ago

0.1.3

9 months ago

0.1.0

9 months ago