Temboo Any Way You Like

March 13 2014

Now you can get up and running with Temboo faster than ever with our new getting started pages. They are packed with tutorials that will get you calling Choreos however you like – in iOS, Java, Node.js, PHP, Processing, Python, Ruby, or with our Choreo editor Twyla. Android SDK and REST API tutorials are coming soon.

Check out our new language pages in our redesigned Library.

Now you can get up and running with Temboo faster than ever with our new getting started pages. They are packed with tutorials that will get you calling Choreos however you like – in iOS, Java, Node.js, PHP, Processing, Python, Ruby, or with our Choreo editor Twyla. Android SDK and REST API tutorials are coming […]

Dev Diary: Coding without Temboo

October 11 2012

In October of 2012, Temboo released a special kind of DevShortcut: superpowerChoreos that take care of a host of development tasks and hook into multiple APIs. One of them was called GoodCitizen.Civic and it returned civic information from a specified area using data.gov, SunlightLabs, LittleSis, and GovTrack … in five lines of code.

The following is a page found from a developer’s logbook as he tried to build the very same app (minus one API):  

I’ll start by trying to get demographic data from Data.gov. The overall Data.gov documentation is a sprawling mess. Finally I realize that the actual API I’m looking for isn’t listed under the Census or Demographics sections at all – it’s actually called the “broadband map API.” (And here I was thinking that broadband was about internet connections, rather than census counts. Whatever.)

There’s no API wrapper that I could find for the Data.gov “broadband map” API, so I’m just going to make the HTTP call directly myself. Awesome. In order to do that, I need an HTTP client library – the Apache HTTPClient lib has worked well for me in the past, so I’ll add that to the project.

Of course, since it’s an Apache library I actually need to add in 4 other libraries that are dependencies (httpmime, httpcore, commons-codec, and commons-logging).

To efficiently handle the data returned by Data.gov, I need to add another library – Apache IOUtils. (Yes, I could do my stream-to-string conversions, etc., without this, but it would make the code much longer.) Now that I’ve found my way to the right place, the Data.gov API documentation isn’t fantastic, but after spending a bit of quality time wrestling with the syntax I can make the call.

Now, on to Sunlight Labs.

The Sunlight Labs API docs page points me at a Java library on Github created 3 years ago by some guy named “lordjoe” (https://github.com/lordjoe/java-sunlightapi/)

The documentation refers to some JAR files that don’t actually exist in the git repo, but whatever; I’ll give it a try.

I cloned the repo and ran the test program; it fails with an error. Not exactly encouraging, but…

Upon further investigation, it turns out that lordjoe’s Sunlight Labs wrapper API I downloaded doesn’t actually include a method to get a list of legislators by coordinates. Fantastic. Fortunately, there’s another Sunlight Labs wrapper on Github written by “tdanforth” two years ago. This one isn’t referenced by their documentation, but I’ll give it a try.

Again, this library is in source format — there’s no JAR available — but at this point I don’t really care. (tdanford has actually included an ANT buildfile, but it’s not worth trying to reconfigure now. I’ll just add this as an item on my todo-list, if I actually get this library functioning.)

The API wrapper provided by tdanford does include a method to list legislators by coordinates (hooray!) but it turns out the way the library is structured doesn’t actually let me use the method because the Legislators API object is defined as a private inner class (@#$%#@!) – so it looks like I’m going to need to refractor tdanford’s API wrapper to make it work in my project.

Refactor completed. Next, I want to use the Sunlight Labs API data to make a request to GovTrack to get information about what each legislator has voted for. As far as I can tell, the only API wrapper available for GovTrack is in Ruby – so again, I’m going to need to write my own wrapper. Fortunately, the GovTrack API documentation is really clean and well presented, so hopefully it won’t hurt too much.

The last step in my project is connecting to Capitol Words, to retrieve top phrases for each of the legislators. There doesn’t seem to be any wrapper library at all for the CapitolWords API, so I’m back to assembling my own HTTP requests. (Deep breath.)

Final status:
Lines of code (without doing any parsing on the API data): 234
External library dependencies: 9

In October of 2012, Temboo released a special kind of DevShortcut: superpowerChoreos that take care of a host of development tasks and hook into multiple APIs. One of them was called GoodCitizen.Civic and it returned civic information from a specified area using data.gov, SunlightLabs, LittleSis, and GovTrack … in five lines of code. The following is a page found […]

Hack Day 2 – playing with the SDK!

February 10 2012

…in which we finally get to hack on the product we’ve been building for months.

We’ve been working nonstop on our new product for months now, and it was about time we gave ourselves a break. So last Monday we geared up for the second in what will be a series of internal Hack Days: for each one, we band together across the company (and the country!) into small teams that each have a day to make something cool with stuff from the Temboo ecosystem.
One thing that made this Hack Day special was that it represented the first time that non-engineers in the company got to play with our new toy, the Java SDK. As a Java dabbler myself, it was really something to be able to actually use the product we had spent months designing and building out. Spoiler alert: it’s awesome.

Without further ado, here’s what we made:

Team 1 – Temboo Demos
JB, Reid, and Joaquin mocked up a “Demos” section of the Temboo Library that would feature sample applications based off of the APIs and shortcuts in the Temboo Library. The interface would break down demos by function (Search, Back up, Convert, Provision, etc) and provide our users with simple skeleton scripts they could riff off of.

Team 2 – MARTHA, the Choreo-executing Campfire bot (PLUS a button of the co-founder)
Mark W., Nick, and Noah (your handsome author) decided to add some life to the company’s Campfire room. Not only did Nick roll his own version of a Campfire chat API out of the Temboo PHP SDK (which, ahem, Nick also wrote), but we added an extra-special feature for our co-founder: we gave him a physical button he could press anytime he wanted to say hi to our non-NYC colleagues. Noah cobbled together the physical interface with an Arduino+Ethernet shield and some discrete components…it was actually doing a lot more earlier in the day, such as alerting people in the NYC office when there was increased activity in the chatroom, but he ran out of ROM space about a half hour before the gong sounded 😦

Team 3 – Geisty, the trend-summarizing agent
Matthew, Jason and Brian went all out and rolled their own fully-fledged “river of trends” that summarized what was hot on the web at the moment. They took the various “trending” methods from Google, Twitter, Youtube, and Instagram (all nicely normalized via our Library’s API abstractions), and served them up automatically to a nifty Tumblr site.

Team 4 – How Rotten Are You?
Tim, Trisala, Aaron and Grant mashed up the Netflix and Rotten Tomatoes APIs to make a site that would analyze your Netflix queue and then tell you, on average, how your taste rated on the Rotten Tomatoes scale. The team used the (under construction) Temboo REST API to execute a series of simple cURL requests to get all the needed data, then served it up in a spiffy jQuery interface. They lost a little time dealing with XSRF woes, but what would a demo be without a few hacks?

Team 5 – Trip Butler
Risa, Bob, and Monty took a pragmatic approach and made themselves a tool they actually needed: their custom Choreo helps them prepare for our upcoming all-hands meeting in the New York office. They used our in-development Twyla application (which lets you author custom Choreos) to absorb the Google Calendars of everyone on the trip (taking into account meetings, travel time, etc) and create a spreadsheet full of events and venues that were highly-recommended on Yelp, foursquare, and Google Places.

Team 6 – Sleepy Heads
Devon, Gina and Jimmy outclassed us all by coming up with an Android app AND a roadmap outlining future development for their idea…way to make us look bad, guys! The concept was a riff on the “smart” alarm clock trend exemplified by the UP and the WakeMate. This alarm takes a more pragmatic approach, using your schedule information combined with local news, traffic, and weather to make a smart estimation of the offset you should add to your normal wake-up time. For example, if the Giants win the superbowl and make everyone late, your alarm will go off early enough for you to still be the first in the office. One exciting direction this could also add would be a social aspect…the ability to bug you when your friends are already at work, getting stuff done, and you’re still in bed.

Takeaways

OAuth may be the single most common headache we all ran into. They may call it a dance, but between the confusingly inconsistent implementations, the difficult-to-automate processes, and the sometimes-nonexistent documentation, it’s definitely still more of a slog. Never fear, however – we have something in the works that will make this dance a breeze!

Harnessing the Power of Shame: At several points during our demos, we realized how much many social interactions are influenced by a fear that others will judge us…from quantifying movie tastes to a social alarm clock, it was very interesting to see this little-addressed social motive emerge as one of the more prominent design themes this time. Perhaps we should look deeper into this for the next round of hacks; but you tell us: what would you like to see us focus on next Hack Day?

…in which we finally get to hack on the product we’ve been building for months. We’ve been working nonstop on our new product for months now, and it was about time we gave ourselves a break. So last Monday we geared up for the second in what will be a series of internal Hack Days: […]
Page 1 of 1