README.md in twilio-ruby-3.12.1 vs README.md in twilio-ruby-3.12.2
- old
+ new
@@ -9,11 +9,11 @@
## Installation
To install using [Bundler][bundler] grab the latest stable version:
```ruby
-gem 'twilio-ruby', '~> 3.11'
+gem 'twilio-ruby', '~> 3.12'
```
To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
```bash
@@ -45,21 +45,21 @@
```
### Send an SMS
``` ruby
-@client.account.messages.create(
+@client.messages.create(
:from => '+14159341234',
:to => '+16105557069',
:body => 'Hey there!'
)
```
### Send an MMS
``` ruby
-@client.account.messages.create(
+@client.messages.create(
:from => '+14159341234',
:to => '+16105557069',
:body => 'Hey there!',
:media_url => 'http://example.com/smileyface.jpg',
)
@@ -67,21 +67,21 @@
### Do Some Stuff With Calls
``` ruby
# make a new outgoing call
-@call = @client.account.calls.create(
+@call = @client.calls.create(
:from => '+14159341234',
:to => '+18004567890',
:url => 'http://example.com/call-handler',
)
# hangup a ringing call, but don't touch it if it's connected
@call.cancel
# if you have the call sid, you can fetch a call object via:
-@call = @client.account.calls.get('CA386025c9bf5d6052a1d1ea42b4d16662')
+@call = @client.calls.get('CA386025c9bf5d6052a1d1ea42b4d16662')
# redirect an in-progress call
@call.redirect_to('http://example.com/call-redirect')
# hangup a call, no matter whether it is ringing or connected
@@ -90,25 +90,25 @@
### List Calls after a certain time
``` ruby
# list calls made or received on or after May 13, 2013
-@client.account.calls.list("start_time>" => "2013-05-13") # Notice we omit the "=" in the "start_time>=" parameter because it is automatically added
+@client.calls.list("start_time>" => "2013-05-13") # Notice we omit the "=" in the "start_time>=" parameter because it is automatically added
```
### Buy a Phone Number
``` ruby
# print some available numbers
-@numbers = @client.account.available_phone_numbers.get('US').local.list(
+@numbers = @client.available_phone_numbers.get('US').local.list(
:contains => 'AWESOME'
)
@numbers.each {|num| puts num.phone_number}
# buy the first one
@number = @numbers[0].phone_number
-@client.account.incoming_phone_numbers.create(:phone_number => @number)
+@client.incoming_phone_numbers.create(:phone_number => @number)
```
## Getting Started With Client Capability Tokens
If you just need to generate a Capability Token for use with Twilio Client, you
@@ -198,6 +198,6 @@
[rubygems]: http://rubygems.org
[gem]: https://rubygems.org/gems/twilio
[travis]: http://travis-ci.org/twilio/twilio-ruby
[codeclimate]: https://codeclimate.com/github/twilio/twilio-ruby
[jruby]: http://www.jruby.org
-[rubinius]: http://rubini.us
\ No newline at end of file
+[rubinius]: http://rubini.us