require 'tropo-webapi-ruby'
require 'sinatra'
post '/index.json' do
t = Tropo::Generator.new
t.say("Welcome to the conference!")
t.conference({:name => 'conference',
:id => '1234'})
t.response
end
var http = require('http');
var tropo_webapi = require('tropo-webapi');
var server = http.createServer(function (request, response) {
var tropo = new TropoWebAPI();
tropo.say("Welcome to the conference!");
//(id, mute, name, playTones, required, terminator)
tropo.conference("1234", null, "conference", null, null, null);
response.end(TropoJSON(tropo));
}).listen(8000);
<?php
require 'tropo.class.php';
$tropo = new Tropo();
$tropo->say("Transferring you now, please wait");
$tropo->conference(null, array("name"=>"conference", "id" => "1234"));
$tropo->RenderJson();
?>
from itty import *
from tropo import Tropo
@post('/index.json')
def index(request):
t = Tropo()
t.say("Welcome to the conference!")
t.conference(id = "1234", name = "conference")
return t.RenderJson()
run_itty(server='wsgiref', host='0.0.0.0', port=8888)
{"tropo":[
{
"say":[{"value":"Welcome to the conference!"}]
},
{
"conference":{
"name":"conference",
"id":"1234"
}
}
]}
require 'tropo-webapi-ruby'
require 'sinatra'
post '/index.json' do
t = Tropo::Generator.new
t.say("Welcome to the conference!")
t.conference({:name => "conference",
:id => "1234",
:terminator => "#",
:mute => true})
t.say("We hope you had fun, call back soon!")
t.response
end
var http = require('http');
var tropo_webapi = require('tropo-webapi');
var server = http.createServer(function (request, response) {
var tropo = new TropoWebAPI();
tropo.say("Welcome to the conference!");
//(id, mute, name, playTones, required, terminator)
tropo.conference("1234", true, "conference", null, null, "#");
tropo.say("We hope you had fun, call back soon!");
response.end(TropoJSON(tropo));
}).listen(8000);
<?php
require 'tropo.class.php';
$tropo = new Tropo();
$tropo->say("Welcome to the conference!");
$tropo->conference('1234', array("name" => "conference", "id" => "1234", "mute" => true, "terminator" => "#"));
$tropo->say("We hope you had fun, call back soon!");
$tropo->RenderJson();
?>
from itty import *
from tropo import Tropo
@post('/index.json')
def index(request):
t = Tropo()
t.say("Welcome to the conference!")
t.conference(id = "1234", name = "conference", mute = True, terminator = "#")
t.say("We hope you had fun, call back soon!")
return t.RenderJson()
run_itty(server='wsgiref', host='0.0.0.0', port=8888)
{"tropo":[
{
"say":[{"value":"Welcome to the conference!"}]
},
{
"conference":{
"name":"conference",
"terminator":"#",
"id":"1234",
"mute":true
}
},
{
"say":[{"value":"We hope you had fun, call back soon!"}]
}
]
}