Fonolo Ruby Library
Description
Ruby library for consuming the Fonolo web services. Fonolo allows deep dialing of corporate IVR menus to bypass the machine and get directly to humans.
Features
The library exposes all of the methods available in the Fonolo API v1.1 and returns a Ruby hash of the results. These methods include:
- check_member
- check_member_number
- company_search
- company_list
- company_details
- call_start
- call_status
- call_canel
For more information please refer to the Fonolo developer website. In order to use this library you will need to sign-up for a username/password and a developer key from the Fonolo website.
Example
require 'fonolo'</h2>
<p>#Initialize the Fonolo object
fonolo = Fonolo.new(“uname”, “passwd”, “key”)</p>
<p>#Check that your username and password are registered as a valid member
fonolo.check_member</p>
<p>#Check that the phone number you plan to use is registered with your user
fonolo.check_member_number(“4155551212”)</p>
<p>#Search the company directory
fonolo.company_search(“hotels”)</p>
<p>#List all of the companies in the Fonolo database from a certain date
fonolo.company_list(5, 0, “2008-01-01”)</p>
<p>#Obtain the company details retrieved from a search or list with company_id
fonolo.company_details(“company_id”)</p>
<p>#Initiate a ‘deep dial’ to a particular company using the company_id
response = fonolo.call_start(“company_id”, “415-555-1212”)</p>
<p>#Obtain the call status based on the session id from a call_start request
fonolo.call_status(response[“result”][“data”][“session_id”])</p>
<p>#Disconnect a call with the session id from a call_start request
fonolo.call_cancel(response[“result”][“data”][“session_id”])
h2. Dependencies
- json_pure v1.1.3+ (for JRuby compatibility)
Installation
require 'fonolo'</h2>
<p>#Initialize the Fonolo object
fonolo = Fonolo.new(“uname”, “passwd”, “key”)</p>
<p>#Check that your username and password are registered as a valid member
fonolo.check_member</p>
<p>#Check that the phone number you plan to use is registered with your user
fonolo.check_member_number(“4155551212”)</p>
<p>#Search the company directory
fonolo.company_search(“hotels”)</p>
<p>#List all of the companies in the Fonolo database from a certain date
fonolo.company_list(5, 0, “2008-01-01”)</p>
<p>#Obtain the company details retrieved from a search or list with company_id
fonolo.company_details(“company_id”)</p>
<p>#Initiate a ‘deep dial’ to a particular company using the company_id
response = fonolo.call_start(“company_id”, “415-555-1212”)</p>
<p>#Obtain the call status based on the session id from a call_start request
fonolo.call_status(response[“result”][“data”][“session_id”])</p>
<p>#Disconnect a call with the session id from a call_start request
fonolo.call_cancel(response[“result”][“data”][“session_id”])
sudo gem install jsgoecke-fonolo —source=http://gems.github.com/