The ruby wrapper of cloopen rest.
The ruby wrapper of cloopen rest.
Add this line to your application's Gemfile:
gem 'cloopen_rest'
And then execute:
$ bundle
Or install it yourself as:
$ gem install cloopen_rest
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'cloopen_rest'
account_sid = 'your_account_sid'
auth_token = 'your_auth_token'
app_id = 'your_app_id'
@client = Cloopen::REST::Client.new(account_sid, auth_token, app_id)
@account = client.account
message = @account.sms.messages.create(
to: 'your_phone_number',
body: 'text sms from gem',
sub_account_sid: 'your_sub_account_sid')
# Get the resquest response and status
message.response
message.response.body
message.response.status
message.response.status_code
info = @account.account_info.get
info.response
landing_call = @account.calls.landing_calls.create(
to: 'your_phone_number',
media_txt: 'Hello, from Gem.',
play_times: 3)
landing_call.response
sub_account = @account.sub_accounts.create friendly_name: 'awesome_name'
sub_account.response
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)Inspired by twilio-ruby