twilio-ruby 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/examples.rb CHANGED
@@ -49,17 +49,17 @@ end
49
49
  ################ SMS MESSAGES ################
50
50
 
51
51
  # print a list of sms messages (one http request)
52
- @account.sms_messages.list({:date_sent => '2010-09-01'}).each do |sms|
52
+ @account.sms.messages.list({:date_sent => '2010-09-01'}).each do |sms|
53
53
  puts sms.body
54
54
  end
55
55
 
56
56
  # print a particular sms message (one http request)
57
- puts @account.sms_messages.get('SMXXXXXXXX').body
57
+ puts @account.sms.messages.get('SMXXXXXXXX').body
58
58
 
59
59
  # send an sms
60
- @account.sms_messages.create(:from => '+14159341234', :to => '+16105557069', :body => 'Hey there!')
60
+ @account.sms.messages.create(:from => '+14159341234', :to => '+16105557069', :body => 'Hey there!')
61
61
  # or, an alias
62
- @account.sms_messages.send('+14159341234', '+16105557069', 'Hey there!')
62
+ @account.sms.messages.send('+14159341234', '+16105557069', 'Hey there!')
63
63
 
64
64
  ################ PHONE NUMBERS ################
65
65
 
@@ -21,7 +21,7 @@ module Twilio
21
21
  uri += '.json'
22
22
  params = (args[0] && args[0] != {}) ? twilify(args[0]) : nil
23
23
  uri += "?#{url_encode(params)}" if params && method == :get
24
- request = method_class.new uri
24
+ request = method_class.new uri, {'User-Agent' => 'twilio-ruby/0.2.1'}
25
25
  request.basic_auth @account_sid, @auth_token
26
26
  request.form_data = params if params && [:post, :put].include?(method)
27
27
  http_response = @connection.request request
@@ -0,0 +1,9 @@
1
+ module Twilio
2
+ module TwiML
3
+ class Response
4
+ def initialize()
5
+
6
+ end
7
+ end
8
+ end
9
+ end
data/lib/twilio-ruby.rb CHANGED
@@ -38,3 +38,4 @@ require 'twilio-ruby/rest/transcriptions/transcriptions'
38
38
  require 'twilio-ruby/rest/notifications/notification'
39
39
  require 'twilio-ruby/rest/notifications/notifications'
40
40
  require 'twilio-ruby/rest/client'
41
+ require 'twilio-ruby/twiml/response'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twilio-ruby
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
9
+ - 1
10
+ version: 0.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Andrew Benton
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-03-01 00:00:00 -08:00
18
+ date: 2011-03-14 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -91,7 +91,7 @@ files:
91
91
  - lib/twilio-ruby/rest/available_phone_numbers/toll_free.rb
92
92
  - lib/twilio-ruby/rest/sandbox/sandbox.rb
93
93
  - lib/twilio-ruby/rest/instance_resource.rb
94
- - lib/twilio-ruby/twiml/verb.rb
94
+ - lib/twilio-ruby/twiml/response.rb
95
95
  - test/twilio_spec.rb
96
96
  - test/test_twilio.rb
97
97
  - examples.rb
@@ -1,5 +0,0 @@
1
- module Twilio
2
- class Verb
3
-
4
- end
5
- end