require 'tropo-webapi-ruby'
require 'sinatra'
post '/index.json' do
t = Tropo::Generator.new
t.call(:to => "+14075550100", :network => "SMS")
t.say(:value => "Tag, you're it!")
t.response
end
var http = require('http');
var tropo_webapi = require('tropo-webapi');
var server = http.createServer(function (request, response) {
var tropo = new TropoWebAPI();
//to, answerOnMedia, channel, from, headers, name, network, recording, required, timeout
tropo.call("+14075550100", null, null, null, null, null, "SMS", null, null, null);
tropo.say("Tag, you're it!!");
response.end(TropoJSON(tropo));
}).listen(8000);
<?php
require 'tropo.class.php';
$tropo = new Tropo();
$tropo->call("+14155550100", array('network'=>'SMS'));
$tropo->say("Tag, you're it!");
$tropo->RenderJson();
?>
from itty import *
from tropo import Tropo, Session
@post('/index.json')
def index(request):
t = Tropo()
t.call(to="+14075550100", network = "SMS")
t.say("Tag, you're it!")
return t.RenderJson()
run_itty(server='wsgiref', host='0.0.0.0', port=8888)
{"tropo":[
{"call":{
"to":"+14075550100",
"network":"SMS"
}
},
{"say":{"value":"Tag, you're it!"}}
]}