Need help with twilio?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

philm
123 Stars 38 Forks MIT License 115 Commits 0 Opened issues

Description

Twilio API client

Services available

!
?

Need anything else?

Contributors list

# 267,722
HTML
CSS
kibana
elastic...
83 commits
# 20,628
Ruby
Go
hubot
Amazon ...
4 commits
# 352,568
C
Shell
HTML
2 commits
# 196,966
HTML
elastic...
kibana
elk
2 commits
# 79,130
Ruby
chef-re...
percona
s3
1 commit
# 131,966
Ruby
Rails
Shell
rubygem
1 commit
# 199,407
Objecti...
HTML
Atom
xterm
1 commit
# 283,035
Heroku
HTML
silex
Bash
1 commit
# 131,081
HTML
CSS
npm
job-que...
1 commit

= Twilio Gem

The Twilio gem provides two major pieces of functionality: (1) a Ruby wrapper for the Twilio REST API and (2) response handlers based on the Twilio Markup XML (TwiML).

See http://www.twilio.com/docs/index for Twilio's API documentation.

== Calling the Twilio REST API

First set your credentials by calling the connect method:

Twilio.connect('mytwiliosid', 'myauthtoken')

Now call any of the Twilio classes:

Twilio::Call.make('1234567890', '9876543210', 'http://mysite.com/connected_call') Twilio::Recording.list

== Responding to Twilio

When Twilio calls your application URL, your response must use the Twilio Markup XML (http://www.twilio.com/docs/api_reference/TwiML/). The Twilio gem makes this very easy by providing a Twilio Verb class.

For example, in a Ruby on Rails application, you could do the following inside a controller class:

Twilio::Verb.dial '415-123-4567'

and you can nest multiple verbs inside a block:

verb = Twilio::Verb.new { |v| v.say "The time is #{Time.now}" v.hangup } verb.response

== Installation

gem install twilio

== Contributing

  1. Run 'bundle' from the command line to install dependencies
  2. Write test(s) for your patch
  3. Submit a pull request

Note: don't require 'rubygems' in any file (http://www.rubyinside.com/why-using-require-rubygems-is-wrong-1478.html)

== Testing

  • Currently using RSpec
  • Tested with REE 1.8.7, MRI 1.9.2, MRI 1.9.3, and JRuby 1.6.5

== Copyright

Copyright Phil Misiowiec, Webficient LLC. See LICENSE for details.

== Contributors

  • Kyle Daigle
  • Yuri Gadow
  • Kyle Humberto
  • Vlad Moskovets
  • Jonathan Rudenberg
  • Mark Turner
  • Jeff Wigal
  • Alex K Wolfe

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.