1.3.0 • Published 19 days ago

@666666/messagejs v1.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
19 days ago

Messagejs

A message sending util

example workflow

Support List

Install

npm install messagejs

Usage

BARK

import { Bark } from '@666666/messagejs'

const bark = new Bark({
  serverUrl: 'http://foo.com',
  defaultPushOption: {
    deviceKey: 'foo,bar',
    sound: 'bloom.caf'
  }
})

//  push
bark.push({
  deviceKey: 'bar',
  title: 'bar',
  body: 'ahhhhhhhhh'
})

ServerChan

import { ServerChan } from '@666666/messagejs'

const serverchan = new ServerChan({
  sendKey: 'xxxx',
  encodeOptions: {  //  option
    uid: 123,
    key: 'xxx'
  }
})

serverchan.send({
  title: 'xxx',
  desp: 'xxx',
  openid: 'axxx,bxxx,cxxx',
  encoded: true, //  option
  channel: '9|66'
})

alisms(前阿里大于)

import { Alisms } from '@666666/messagejs'

const alisms = new Alisms({
  accessKeyId: 'xxx',
  accessKeySecret: 'xxx'
})

alisms.sendSms({
  phoneNumbers: '13xxxxxxx',
  signName: '测试',
  templateCode: 'xxxx',
  templateParam: '{a: 123, b: 456}'
})

Todo

1.3.0

19 days ago

1.2.0

3 years ago

1.2.1

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago