twilio 2.8.0 → 2.9.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +2 -5
- data/Rakefile +1 -1
- data/VERSION.yml +2 -2
- data/lib/twilio/call.rb +2 -2
- data/lib/twilio/connection.rb +1 -1
- data/lib/twilio/local_phone_number.rb +2 -2
- data/lib/twilio/toll_free_phone_number.rb +2 -2
- data/test/fixtures/xml/call.xml +2 -2
- data/test/fixtures/xml/call_new.xml +2 -2
- data/test/fixtures/xml/call_redirected.xml +2 -2
- data/test/fixtures/xml/calls.xml +4 -4
- data/test/fixtures/xml/notification.xml +1 -1
- data/test/test_helper.rb +1 -1
- data/test/twilio/account_test.rb +1 -1
- data/test/twilio/call_test.rb +1 -1
- data/test/twilio/conference_test.rb +1 -1
- data/test/twilio/connection_test.rb +1 -1
- data/test/twilio/incoming_phone_number_test.rb +1 -1
- data/test/twilio/local_phone_number_test.rb +1 -1
- data/test/twilio/notification_test.rb +1 -1
- data/test/twilio/outgoing_caller_id_test.rb +1 -1
- data/test/twilio/recording_test.rb +1 -1
- data/test/twilio/sms_test.rb +1 -1
- data/test/twilio/toll_free_phone_number_test.rb +1 -1
- data/test/twilio/verb_test.rb +1 -1
- data/twilio.gemspec +3 -3
- metadata +5 -4
data/README.rdoc
CHANGED
@@ -4,7 +4,7 @@ The Twilio gem provides two major pieces of functionality: (1) a Ruby wrapper fo
|
|
4
4
|
|
5
5
|
See http://www.twilio.com/docs/index for Twilio's API documentation.
|
6
6
|
|
7
|
-
For an overview of the Twilio Gem and a sample use case, check out http://www.webficient.com/2009/06/22/hello-this-is-your-rails-app-calling-you.
|
7
|
+
For an overview of the Twilio Gem and a sample use case, check out our cached blog entry: http://webcache.googleusercontent.com/search?q=cache:AejgwBra3fMJ:www.webficient.com/2009/06/22/hello-this-is-your-rails-app-calling-you+site:http://www.webficient.com/2009/06/22/hello-this-is-your-rails-app-calling-you&hl=en&gl=us&strip=1
|
8
8
|
|
9
9
|
== Calling the Twilio REST API
|
10
10
|
|
@@ -46,7 +46,4 @@ Copyright (c) 2009-2010 Phil Misiowiec, Webficient LLC. See LICENSE for details.
|
|
46
46
|
|
47
47
|
== Contributors
|
48
48
|
|
49
|
-
Kyle Daigle
|
50
|
-
Jonathan Rudenberg
|
51
|
-
Jeff Wigal
|
52
|
-
Alex K Wolfe
|
49
|
+
Kyle Daigle, Yuri Gadow, Jonathan Rudenberg, Jeff Wigal, Alex K Wolfe
|
data/Rakefile
CHANGED
@@ -8,7 +8,7 @@ begin
|
|
8
8
|
gem.description = %Q{Twilio API wrapper}
|
9
9
|
gem.email = "github@webficient.com"
|
10
10
|
gem.homepage = "http://github.com/webficient/twilio"
|
11
|
-
gem.authors = ["Phil Misiowiec", "Jonathan Rudenberg", "Alex K Wolfe", "Kyle Daigle", "Jeff Wigal"]
|
11
|
+
gem.authors = ["Phil Misiowiec", "Jonathan Rudenberg", "Alex K Wolfe", "Kyle Daigle", "Jeff Wigal", "Yuri Gadow"]
|
12
12
|
gem.add_dependency 'builder', '>= 2.1.2'
|
13
13
|
gem.add_dependency 'httparty', '>= 0.4.3'
|
14
14
|
end
|
data/VERSION.yml
CHANGED
data/lib/twilio/call.rb
CHANGED
@@ -6,8 +6,8 @@ module Twilio
|
|
6
6
|
# Example:
|
7
7
|
# Twilio.connect('my_twilio_sid', 'my_auth_token')
|
8
8
|
# Twilio::Call.make(CALLER_ID, user_number, 'http://myapp.com/twilio_response_handler')
|
9
|
-
def make(
|
10
|
-
Twilio.post("/Calls", :body => {:
|
9
|
+
def make(from, to, url, optional = {})
|
10
|
+
Twilio.post("/Calls", :body => {:From => from, :To => to, :Url => url}.merge(optional))
|
11
11
|
end
|
12
12
|
|
13
13
|
def list(optional = {})
|
data/lib/twilio/connection.rb
CHANGED
@@ -7,9 +7,9 @@ module Twilio
|
|
7
7
|
class LocalPhoneNumber < TwilioObject
|
8
8
|
def create(url, area_code = nil, method = 'POST', friendly_name = nil, options = {})
|
9
9
|
Twilio.post("/IncomingPhoneNumbers/Local", :body => {
|
10
|
-
:
|
10
|
+
:VoiceUrl => url,
|
11
11
|
:AreaCode => area_code,
|
12
|
-
:
|
12
|
+
:VoiceMethod => method,
|
13
13
|
:FriendlyName => friendly_name
|
14
14
|
}.merge(options))
|
15
15
|
end
|
@@ -7,9 +7,9 @@ module Twilio
|
|
7
7
|
class TollFreePhoneNumber < TwilioObject
|
8
8
|
def create(url, area_code = nil, method = 'POST', friendly_name = nil)
|
9
9
|
Twilio.post("/IncomingPhoneNumbers/TollFree", :body => {
|
10
|
-
:
|
10
|
+
:VoiceUrl => url,
|
11
11
|
:AreaCode => area_code,
|
12
|
-
:
|
12
|
+
:VoiceMethod => method,
|
13
13
|
:FriendlyName => friendly_name
|
14
14
|
})
|
15
15
|
end
|
data/test/fixtures/xml/call.xml
CHANGED
@@ -5,8 +5,8 @@
|
|
5
5
|
<DateUpdated>Sat, 07 Feb 2009 13:15:19 -0800</DateUpdated>
|
6
6
|
<CallSegmentSid/>
|
7
7
|
<AccountSid>mysid</AccountSid>
|
8
|
-
<
|
9
|
-
<
|
8
|
+
<To>4159633717</To>
|
9
|
+
<From>4156767925</From>
|
10
10
|
<PhoneNumberSid>PN01234567890123456789012345678900</PhoneNumberSid>
|
11
11
|
<Status>2</Status>
|
12
12
|
<StartTime>Thu, 03 Apr 2008 04:36:33 -0400</StartTime>
|
@@ -2,8 +2,8 @@
|
|
2
2
|
<Call>
|
3
3
|
<Sid>CA42ed11f93dc08b952027ffbc406d0868</Sid>
|
4
4
|
<CallSegmentSid/> <AccountSid>AC309475e5fede1b49e100272a8640f438</AccountSid>
|
5
|
-
<
|
6
|
-
<
|
5
|
+
<To>4155551212</To>
|
6
|
+
<From>4158675309</From>
|
7
7
|
<PhoneNumberSid>PN01234567890123456789012345678900</PhoneNumberSid>
|
8
8
|
<Status>0</Status>
|
9
9
|
<StartTime>Thu, 03 Apr 2008 04:36:33 -0400</StartTime>
|
@@ -3,8 +3,8 @@
|
|
3
3
|
<Sid>CA42ed11f93dc08b952027ffbc406d0868</Sid>
|
4
4
|
<CallSegmentSid/>
|
5
5
|
<AccountSid>AC309475e5fede1b49e100272a8640f438</AccountSid>
|
6
|
-
<
|
7
|
-
<
|
6
|
+
<To>4155551234</To>
|
7
|
+
<From>4158675309</From>
|
8
8
|
<PhoneNumberSid>PN01234567890123456789012345678900</PhoneNumberSid>
|
9
9
|
<Status>1</Status>
|
10
10
|
<StartTime>Thu, 03 Apr 2008 04:36:33 -0400</StartTime>
|
data/test/fixtures/xml/calls.xml
CHANGED
@@ -6,8 +6,8 @@
|
|
6
6
|
<DateUpdated>Sat, 07 Feb 2009 13:15:19 -0800</DateUpdated>
|
7
7
|
<CallSegmentSid/>
|
8
8
|
<AccountSid>mysid</AccountSid>
|
9
|
-
<
|
10
|
-
<
|
9
|
+
<To>4159633717</To>
|
10
|
+
<From>4156767925</From>
|
11
11
|
<PhoneNumberSid>PN01234567890123456789012345678900</PhoneNumberSid>
|
12
12
|
<Status>2</Status>
|
13
13
|
<StartTime>Thu, 03 Apr 2008 04:36:33 -0400</StartTime>
|
@@ -22,8 +22,8 @@
|
|
22
22
|
<DateUpdated>Sat, 07 Feb 2009 13:15:19 -0800</DateUpdated>
|
23
23
|
<CallSegmentSid/>
|
24
24
|
<AccountSid>mysid</AccountSid>
|
25
|
-
<
|
26
|
-
<
|
25
|
+
<To>2064287985</To>
|
26
|
+
<From>4156767925</From>
|
27
27
|
<PhoneNumberSid>PNd59c2ba27ef48264773edb90476d1674</PhoneNumberSid>
|
28
28
|
<Status>2</Status>
|
29
29
|
<StartTime>Thu, 03 Apr 2008 01:37:05 -0400</StartTime>
|
@@ -12,7 +12,7 @@
|
|
12
12
|
<MessageDate>Thu, 03 Apr 2008 04:36:32 -0400</MessageDate>
|
13
13
|
<RequestURL>http://yourserver.com/handleCall.php</RequestURL>
|
14
14
|
<RequestMethod>POST</RequestMethod>
|
15
|
-
<RequestVariables>
|
15
|
+
<RequestVariables>From=4158675309&To=4155551212...</RequestVariables>
|
16
16
|
<ResponseHeaders>Content-Length: 500</ResponseHeaders>
|
17
17
|
<ResponseBody><h1>Error parsing PHP script</h1></ResponseBody>
|
18
18
|
</Notification>
|
data/test/test_helper.rb
CHANGED
@@ -24,7 +24,7 @@ def stub_response(verb, fixture_name, options = {}) #:nodoc:
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def twilio_url(url=nil) #:nodoc:
|
27
|
-
"https://mysid:mytoken@api.twilio.com:443/
|
27
|
+
"https://mysid:mytoken@api.twilio.com:443/2010-04-01/Accounts/mysid#{'/' + url if url}"
|
28
28
|
end
|
29
29
|
|
30
30
|
def verb_response(verb) #:nodoc:
|
data/test/twilio/account_test.rb
CHANGED
data/test/twilio/call_test.rb
CHANGED
data/test/twilio/sms_test.rb
CHANGED
data/test/twilio/verb_test.rb
CHANGED
data/twilio.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{twilio}
|
8
|
-
s.version = "2.
|
8
|
+
s.version = "2.9.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = ["Phil Misiowiec", "Jonathan Rudenberg", "Alex K Wolfe", "Kyle Daigle", "Jeff Wigal"]
|
12
|
-
s.date = %q{2010-
|
11
|
+
s.authors = ["Phil Misiowiec", "Jonathan Rudenberg", "Alex K Wolfe", "Kyle Daigle", "Jeff Wigal", "Yuri Gadow"]
|
12
|
+
s.date = %q{2010-10-27}
|
13
13
|
s.description = %q{Twilio API wrapper}
|
14
14
|
s.email = %q{github@webficient.com}
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twilio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 43
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 2
|
8
|
-
-
|
8
|
+
- 9
|
9
9
|
- 0
|
10
|
-
version: 2.
|
10
|
+
version: 2.9.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Phil Misiowiec
|
@@ -15,11 +15,12 @@ authors:
|
|
15
15
|
- Alex K Wolfe
|
16
16
|
- Kyle Daigle
|
17
17
|
- Jeff Wigal
|
18
|
+
- Yuri Gadow
|
18
19
|
autorequire:
|
19
20
|
bindir: bin
|
20
21
|
cert_chain: []
|
21
22
|
|
22
|
-
date: 2010-
|
23
|
+
date: 2010-10-27 00:00:00 -07:00
|
23
24
|
default_executable:
|
24
25
|
dependencies:
|
25
26
|
- !ruby/object:Gem::Dependency
|