npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@adetoola/sms

v2.1.2

Published

SMS is a succinct and flexible way to add Nigerian SMS providers integration to nodejs apps.

Downloads

63

Readme

SMS

SMS is a succinct and flexible way to add Nigerian SMS providers integration to nodejs apps.

Contents

Installation

Getting started with SMS is quite easy, just install using your favourite package manager.

Using Yarn
 yarn add @adetoola/sms
Using NPM
 npm install @adetoola/sms

Available SMS Gateway

You can specify any of the supported sms gateway from the list below:

  • [x] Test (Use as a test account)
  • [x] SMS247Live
  • [ ] XWireless
  • [ ] 50Kobo
  • [ ] SMSTube
import SMS from '@adetoola/SMS';

const sms = new SMS('SMSLive247');

SMS Gateway Credentials

Each SMS service provider will give authorised users a set of credentials to use when sending SMS or interacting with their services.

# Test
SMS_SENDER='YOUR_SENDER_NAME_HERE'

# SMS247Live
SMS_SENDER='YOUR_SENDER_NAME_HERE'
SMS_SESSION_ID='YOUR_SESSION_ID_HERE'

Usage

Using SMS is quite simple.

const sms = new SMS('SMSLive247');
sms.sender(sender).country(country).credentials(credentials);

const messageId = sms.send('08123456789', 'NG', 'Hi, I am using Adetoola SMS package');

console.log(messageId);

Methods

| Method | SMS247LIVE | | --- | --- | | SMS::send(recipient, msg [, msg_type]) | + | | SMS::schedule(recipient, msg, datetime[, msg_type]) | + | | SMS::balance() | + | | SMS::charge(msg_id) | + | | SMS::status(msg_id) | + | | SMS::coverage(recipient) | + | | SMS::stop(msg_id) | + | | SMS::history() | + |

Valid Formats

| Input | Description | Accepted Formats | | --- | --- | --- | | recipient | Comma separated numbers, number or array | +2348012345678, 2348012345678, 8012345678, 0812345678 | | country | "Country" is a two-letter ISO country code (like NG) | [AZ]{2} | | msg | Text message which will be sent to the numbers. |[a-zA-Z0-9+-."'\s]{1,160} | | sender | Number to display as sender | [a-zA-Z0-9-]{1,11} | | msg_type | Normal SMS, Flash or MMS | TEXT, FLASH, MMS | | datetime | Datetime in format Y-m-d H:i:s. | 2016-03-16 22:40:34 | | msg_id | Message ID, provider by gateway | [a-zA-Z0-9] |

Example

#coming soon!

Change log

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

SMS is an open-sourced package licensed under the MIT license.