iGoogle Gadget for Backpack Reminders

A little while ago, I toyed with the idea of creating an iGoogle Gadget for Backpack Reminders as a fun experiment. As far as I can tell, basic reminder creation functionality works reliably, so I figure I’d share it.

To try it out, you’ll need a Backpack account and a customized iGoogle page. Getting a basic iGoogle page is easy enough, but I’ll point out that after you create a Backpack account you’ll need to grab your API key. (After logging in, click the My Info link towards the upper right, then scroll all the way down to the Backpack API Key section.)

With your Backpack username and API key handy, you’re ready to add the gadget to your iGoogle page.

  1. Go to your iGoogle page.
  2. Click the Add stuff link towards the upper right.
  3. Click the Add feed or gadget link towards the lower left.
  4. Paste this URL (http://rossbelmont.com/google/backpack-reminders.xml) into the text field and click Add.
  5. Click OK in the security warning popup. (This gadget only stores your data on Google’s servers.)
  6. Click the Back to iGoogle home link towards the upper left and notice your new gadget on the page.
  7. Paste your Username and API Key into the text fields and click Save.

This will be a lot more fun if you’ve already created some reminders, but if not you can create some right there inside the widget. If you’re interested in how this was built, read on.

How this Gadget works

Creating the Gadget was an interesting exercise. Google provides a web-based editor to code/test/debug these little guys, which is both cute and limiting at the same time. Also, the Gadget is defined in an XML file, so in this case there’s a bunch of JavaScript code actually inside the XML. If you want to look at the code, just open the XML file in your favorite text editor.

To actually create a reminder, an HTTP POST is necessary due to how the Backpack API works. The Gadget API can only perform GETs as of this writing, so I wrote a small bit of PHP (code here) to handle this. (If you’re paranoid, you’ll note that your Username and API Key are stored by iGoogle and only passed through the code.) I was considering using jQuery to POST within the Gadget and avoid running anything on my own server, but unfortunately the AJAX-iness of iGoogle Gadgets doesn’t seem super-robust. Sometimes PHP just works.

Anyway, I hope you like it.