smspro
Last updated 2 years ago by jimjardland .
ISC · Original npm · Tarball · package.json
$ cnpm install smspro 
SYNC missed versions from official npm registry.

Smspro

This is created to send and recieve sms from https://www.smspro.se

Usage:

Send

const SmsPro = require('smspro')

const smsPro = new SmsPro({
  'customerId': '',
  'customerPassword': '',
  'username': '',
  'password': '',
  'endpoint': '',
  'from': ''
})

await smsPro.sendMtSms({ to: ['phoneNumber'], message: 'k-dot is amazing'})

Returns:

{
  datetime: '2018-03-16 15:58:19',
  message: 'The MT SMS request is being processed.',
  code: '0',
  status: '0',
  errorCode: '0',
  customerId: 'kdot',
  mobilectrlId: '9123812831238'
}

Parse incoming the xml-message to JSON:

smsPro.parseIncoming(xml)

Returns:

{
  message: 'Text message from mobile',
  phoneNumber: '+46708651052',
  phoneNumberNormalized: '0708651052'
}

Send flash sms

const SmsPro = require('smspro')

const smsPro = new SmsPro({
  'customerId': '',
  'customerPassword': '',
  'username': '',
  'password': '',
  'endpoint': '',
  'from': ''
})

await smsPro.sendFlashSms({ to: ['phoneNumber'], message: 'k-dot is amazing'})

Current Tags

  • 1.3.0                                ...           latest (a year ago)

11 Versions

  • 1.3.0                                ...           a year ago
  • 1.1.1                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.7                                ...           2 years ago
  • 1.0.6                                ...           2 years ago
  • 1.0.5                                ...           2 years ago
  • 1.0.4                                ...           2 years ago
  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (6)
Dev Dependencies (7)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |