1.0.1 • Published 6 years ago

@breadhead/red-sms-client v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

red-sms-client

Sms client for REDSMS.

Instalation

yarn add @breadhead/red-sms-client

Usage

import RedSmsClient from 'red-sms-client';


const smsClient = new RedSmsClient(login, apiKey);

Methods

sendSms

const from = 'My First StartUp';
const to = '+79999999999';
const text = 'Hello, World!';

const result = await smsClient.sendSms(from, to, text);

returns

RedSmsResponse {
  messages: [
    {
      uuid: string,
      to: string,
    },
  ],
}

and throws

RedSmsException {
  prev: Error
  message: string
}