Hoiio
This is Ruby SDK for Hoiio API
Hoiio API is set of telephony API that integrate telephony services - phone calls, conference, IVR (Interactive Voice Responses), Fax and SMS - into your services and website easily.
Read the documentation at http://hoiio.readthedocs.org/
Installation
Add this line to your application's Gemfile:
gem 'hoiio'
And then execute:
$ bundle
Or install it yourself as:
$ gem install hoiio
Getting Started With Hoiio Ruby Gem
Setup
require 'hoiio-ruby'
# Hoiio Application Credentials
app_id = ''
access_token = ''
# create a client to cache the authentication detail and talk to Hoiio RESTful API
@client = Hoiio::Client.new app_id, access_token
Usage
After a @client object has been created, app_id and access_token are cached and used for subsequent API calls. Normally, app_id won't change, but you can modify the client's access_token by reassigning it to a new one.
All API's URIs specified in Hoiio Developer's website are included in this SDK and can be accessed conveniently.
For example, @client.sms will make all SMS APIs with the same name available, i.e: @client.sms.send will call /sms/send, @client.sms.query_status will fire a request to /sms/query_status (as specified here).
Send an SMS
# send an SMS using Hoiio
@client.sms.send({
:dest => '+6591234567',
:msg => 'Hello Steve',
:notify_url => 'http://dev.example.com/sms/notify'
})
Make a call
# call a destination number using Hoiio
@client.voice.call({
:dest2 => '+6591234567',
:caller_id => 'private'
})
API References
Visit our API site to learn more about our powerful communication API.