This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if(currentCall.channel == 'VOICE') { | |
| say('Hello there Penn Apps participants and guests.'); | |
| say('Even though I use the ' + currentCall.network + ' network, I can still get jiggy.', {voice: 'simon'}); | |
| say('Have fun at Penn Apps mobile.', {voice: 'kate'}); | |
| say('Adiós amigos.', {voice: 'carlos'}); | |
| } | |
| else if(currentCall.channel == 'TEXT') { | |
| say('You sent "' + currentCall.initialText + '" on the '+ currentCall.network + ' network.'); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Include the Tropo WebAPI class. | |
| require('classes/tropo.class.php'); | |
| // Create a new Session object and get the value of the number_to_dial parameter. | |
| $session = new Session(); | |
| $number_to_dial = $session->getParameters("number_to_dial"); | |
| // Create a new Tropo object, dial and say the message. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Baltimore Locator - an IM, SMS, Twitter and Phone application that finds | |
| * locations in Baltimore. | |
| * | |
| * @copyright 2012 Mark J. Headd (http://civic.io) | |
| * @author Mark Headd | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| answer(); | |
| var date = ask('Please say a date.', {choices: 'http://path/to/date.xml'}); | |
| log("*** " + date.value + " ***"); | |
| say('You said ' + date.value); | |
| var time = ask('Now, say a time.', {choices: 'http://path/to/time.xml'}); | |
| log("*** " + time.value + " ***"); | |
| say('You said ' + time.value); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // A function to store a document in CouchDB using cURL. | |
| function saveData($callerID, $channel, $network, $text) { | |
| $doc = json_encode(array("callerID" => $callerID, "channel" => $channel, "network" => $network, "text" => $text)); | |
| $url = COUCH_DB_HOST.":".COUCH_DB_PORT."/".COUCH_DB_NAME; | |
| $ch = curl_init($url); | |
| curl_setopt($ch, CURLOPT_POST, true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| * A script demonstrating how to store user inut in an external database. | |
| */ | |
| // A function to store a document in CouchDB using cURL. | |
| function saveData($callerID, $channel, $network, $text) { | |
| $doc = json_encode(array("callerID" => $callerID, "channel" => $channel, "network" => $network, "text" => $text)); | |
| $url = COUCH_DB_HOST.":".COUCH_DB_PORT."/".COUCH_DB_NAME; |
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 16 columns, instead of 1 in line 5.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NAME,MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY,SATURDAY,SUNDAY,ADDRESS,CITY,STATE,ZIP,PHONE,WEBSITE,LATITUDE,LONGITUDE | |
| Albany Park, 10AM-6PM, 12PM-8PM, 10AM-6PM, 12PM-8PM,9AM- 5PM,9AM- 5PM, Closed,5150 N. Kimball Avenue,CHICAGO,IL,60625,3127441933,http://www.chipublib.org/branch/details/library/albany-park/,41.97478671549107, -87.71359903393845 | |
| Altgeld, 12PM-8PM, 10AM-6PM, 12PM-8PM, 10AM-6PM,9AM- 5PM,9AM- 5PM, Closed,13281 S. Corliss Avenue,CHICAGO,IL,60827,3127473270,http://www.chipublib.org/branch/details/library/altgeld/,41.65473021837776, -87.6022302609835 | |
| Archer Heights, 12PM-8PM, 10AM-6PM, 12PM-8PM, 10AM-6PM,9AM- 5PM,9AM- 5PM, Closed,5055 S. Archer Avenue,CHICAGO,IL,60632,3127479241,http://www.chipublib.org/branch/details/library/archer-heights/,41.8012136599335, -87.72649071431441 | |
| Austin, 12PM-8PM, 10AM-6PM, 12PM-8PM, 10AM-6PM,9AM- 5PM,9AM- 5PM, Closed,5615 W. Race Avenue,CHICAGO,IL,60644,3127465038,http://www.chipublib.org/branch/details/library/austin/,41.889272153514526, -87.76571186722818 | |
| Austin-Irv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Find My Library - an IM and SMS application that finds library locations in Philadelphia. | |
| * | |
| * @copyright 2011 Mark J. Headd (http://www.voiceingov.org) | |
| * @author Mark Headd | |
| * | |
| * Deploy this application on http://www.tropo.com | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var sys = require('sys'); | |
| var Open311 = require('open311').Open311; | |
| var options = { | |
| 'endpoint': 'mayors24.cityofboston.gov', | |
| 'service_path': '/open311/v2/', | |
| 'jurisdiction_id': 'cityofboston.gov', | |
| 'secure': true, | |
| 'port': 6443 | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| :~ mheadd$ curl -v http://api.dc.gov/open311/v2_dev/services.json?jurisdiction_id=dc.gov | |
| * About to connect() to api.dc.gov port 80 (#0) | |
| * Trying 164.82.149.100... connected | |
| * Connected to api.dc.gov (164.82.149.100) port 80 (#0) | |
| > GET /open311/v2_dev/services.json?jurisdiction_id=dc.gov HTTP/1.1 | |
| > User-Agent: curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8l zlib/1.2.3 | |
| > Host: api.dc.gov | |
| > Accept: */* | |
| > | |
| < HTTP/1.1 500 Internal Server Error |