npm.io
1.0.0 • Published 5 years ago

@nextsms/js-client

Licence
MIT
Version
1.0.0
Deps
1
Size
125 kB
Vulns
23
Weekly
0
DeprecatedThis package is deprecated

NextSMS Client for Node.js

Tests


The NextSMS SDK allows developers to easily integrate NextSMS solutions in their Javascript code, and build robust applications and software.

Documentation

Take a look at the SDK docs here.

Usage

NOTE:
> Test Mode ONLY Single destination and Multiple destinations APIs support testing mode.

Quick Examples
yarn add @nextsms/js-client
# or
npm i @nextsms/js-client
import NextSMS from '@nextsms/js-client';

// Populate the credentials
const username = 'username';
const password = 'password';

// Initiate with credentials
let nextsms = new NextSMS({ username, password, environment: 'testing' });

const data = {
  from: 'NEXTSMS',
  to: '255123456789',
  text: 'Hello World',
};

// Send the sms
nextsms
  .singleDestination(data)
  .then(data => {
    // Print results
    console.log(data);
  })
  .catch(error => {
    console.log('error: ' + error);
  });
Testing
yarn test

Opening Issues

If you have a feature request or you encounter a bug, please file an issue on our issue tracker on GitHub.

Credits

License

The MIT License (MIT). Please see License File for more information.

Keywords