0.0.1 • Published 12 years ago

twilio-numbers v0.0.1

Weekly downloads
2
License
-
Repository
-
Last release
12 years ago

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