require 'rubygems' require 'rest_phone' # Create the service object with the right credentials. # You can either specify them in a file (using :credentials_file) # or specify them directly (using :username and :password). # # The credentials file is YAML, so just has: # # username: myusername # password: mypassword service = RestPhone::Service.new( :credentials_file => File.dirname(__FILE__) + '/../../config/api_auth.yml' ) # Everyone would rather hear Hamlet than a simple "hello world." hello_world_menu = RestPhone::PhoneMenuBuilder.create_menu do |m| m.play :play_text => < hello_world_menu, :src_number => 12065551212, :destination_number => 12065551212 ) puts "Call requested."