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

node-exotel-whitelist

v1.0.10

Published

In Exotel's system, you need to add your DND client's phone number, this process is called whitelisting. This package will be a great aid in the node environment to whitelist DND numbers.

Downloads

20

Readme

node-exotel-whitelist

In Exotel's system, you need to add your DND client's phone number, this process is called whitelisting. This package will be a great aid in the node environment to whitelist DND numbers. You can check whether a number has been whitelisted or not and also get metadata of a number.

Getting Started

First you have to create an account in https://my.exotel.com/auth/register, then you will get 'api_key','api_token' and 'sid'. These informations are most important to call all methods of this package.

Prerequisites

To install node-exotel-whitelist , you need node.js and npm.

Installing

Once you have that set-up, just run

npm install --save node-exotel-whitelist

in your project directory.

Usage

node-exotel-whitelist have four methods, and four of them return promise and needs a common set of parameters. That is,

urlOption = {
    apiKey          : // your exotel api key.
    apiToken        : // your exotel secret api Token.
    sId             : // your sid.
}

//require this package:
var exotel  = require('node-exotel-whitelist');

**actual responses from exotel are in XML, but in this package xml-js have been used to convert those XML response in JSON.

  1. whiteListDetails : using it, one can check whether a number is whitelisted or not. it needs two parameters, 'urlOption','phoneNumber'.
    var details = exotel.whiteListDetails(urlOption, phoneNumber)
    details.then((response) => { // since it's return promise
        console.log(response)
    }).catch((err) => {
        console.error(err)
    }) 
  1. whiteListANumber : this one is for whitelist a number. it recieves two parameters, 'urlOption' and 'numberInfo'
    let numberInfo = {
        virtualNumber        : // after registration in exotel, you get a virutal number;
        phoneNumber          : // that number you want to whitelist;
    }
    var whitelisted     = exotel.whiteListANumber(urlOption, numberInfo);
    
  1. removeFromNumber : this one delete a list of whitelisted number, recieves two parameters, 'urlOption' and 'arrayOfPhone'.
    let arrayOfPhone = ['898XXXXXX2','7686XXXX21'];
    let removed      = exotel.removeFromWhiteList(urlOption,arrayOfPhone);
  1. numberMetaData : this one provides meta data about a phone number ( Telecom Circle, Telecom Circle Name, Number Type Whether the number belongs to DND or not) recieves two parameters, 'urlOption' and 'phoneNumber'.
    let phoneNumber = '898XXXXX20';
    let metaData = exotel.numberMetaData(urlOption, phoneNumber)

*** All methods of this package returns Promise.

Authors

License

This project is licensed under the MIT License.