twilio-numbers

0.0.1 • Public • Published

Twilio Numbers

Bulk phone number management for Node.js Twilio applications.

Usage

Use along with the twilio module.

var TwilioNumbers = require('twilio-numbers')
  , TwilioClient = require('twilio').Client
  , config = require('./config')
  , numbers = new TwilioNumbers(config.twilio_sid, config.twilio_token, config.twilio_app_sid)
  , client = new TwilioClient(config.twilio_sid, config.twilio_token, config.twilio_host);

// Set up a phone using any available number beginning with area code '604'
numbers.getNumber({"PhoneNumber": "604*******"}, function(number, err) {
  if (err) throw err;
  var phone = client.getPhoneNumber(number);

  phone.setup(function() {
  ...
  // Rest of call is documented in the twilio package.
});

License

Licensed MIT. See LICENSE file.

Todo

  • Complete buyNumbers()
  • Complete deleteNumbers()
  • Store numbers in redis
  • Test using mocks

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i twilio-numbers

    Weekly Downloads

    0

    Version

    0.0.1

    License

    MIT

    Last publish

    Collaborators

    • sprice