0.0.1 • Published 6 years ago

mobily-ws v0.0.1

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

Build Status

Mobily Ws

A Node.js client to communicate with mobily.ws API

Installation

npm install mobily-ws --save

Usage

Javascript

const mobilyWs = require('mobily-ws');

const client = mobilyWs('YOUR API KEY', 'SENDER NAME');

// Extra options to send to the api.
const options = {
    dateSend: '01/01/2020',
    timeSend: '15:30:00',
};

client.sendSMS('Thank you for your business', ['966511111111', '966522222222'], options)
    .then(function (response) {
        console.log(response)
    });

TypeScript/ES6

import mobilyWs from 'mobily-ws';

const client = mobilyWs('YOUR API KEY', 'SENDER NAME');

// Extra options to send to the api.
const options = {
    dateSend: '01/01/2020',
    timeSend: '15:30:00',
};

client.sendSMS('Thank you for your business', ['966511111111', '966522222222'], options)
    .then((response) => {
        console.log(response)
    });

Test

npm run test