Enterprise Integration Zone is brought to you in partnership with:

Simeon has been involved in programming for more than a decade. He has wide ranging experience as an independent software developer for most of that time but prefers Python. He recently became a full-time technical instructor for Marakana.com. Simeon is a DZone MVB and is not an employee of DZone and has posted 12 posts at DZone. You can read more from them at their website. View Full User Profile

Modesto Scripting Language Meetup.com API Mashups

02.01.2013
| 2796 views |
  • submit to reddit
Recently the Modesto Scripting Language Meetup had another hack night. The theme of the meetup was Twilio apps and API's in general. We had presentations on Twilio and the Meetup REST API.

My slides are available and I put up the slides and the sample code demonstrating simple TwiML and Meetup API usage in plain PHP (no client libraries used) at GitHub. If you're new to Twilio be sure to walk through the slides but you might particularly be interested in a sample 1-file complete php/Twilio App. My secrets.php is a simple phone app that you can call, save a number entered via keypad, then call back to retrieve the stored "secret".

This of course is just a toy app - my initial thought for the meetup was to build a Twilio app that let MSLM users call a number to find out the next scheduled meetup. We had low attendance, however, and an request from an attendee to make an app that recorded a message and then broadcast the message to a list of numbers.

I'm always happy to tackle a "real" problem - and since the attendee has limited PHP experience I stuck with an old school approach - individual PHP files make up individual views - and no client libraries that obscure what's really going on. I'd really like to redo this with a micro-framework for routing and the PHP client libraries to handle emitting TwiML - but exactly what is going on might be less clear. See the masscall for the code. Perhaps next time we'll revisit the API Mashup idea and I'll use Python, Flask, and a twilio client library to see how much cleaner the code can be.

I had a lot of fun playing with Twilio - writing a web app where the "client" is a voice phone call is really cool. I'm also impressed with the customer service, docs, and code samples as well as the fully functional trial account. If you've ever thought of a problem that could be solved my making or receiving phone calls or SMS, Twilio makes it easy to start exploring the solution.

Published at DZone with permission of Simeon Franklin, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)