Using the SmugMug API from Adobe AIR

SmugMug is an online photo sharing site that has a powerful API. I've been looking for a Mac based bulk uploader that will do things like skip duplicates and couldn't find one, so I set out to write one using Flex Builder and Adobe AIR.

I'm not done yet, but I've got all the pieces working well enough now that I have something I can post. Here it is:


(If you download this and get what looks like a zip file, make sure you're downloading and saving as Smug.air - I think I need to figure out how to get the right MIME type set for a *.air file, because Safari seems to be figuring out it's a Zip file and downloading it as a folder called Smug. If that's what you've got, I don't see any way to feed that to the AIR installer).

If you've got the AIR runtime installed and you run Smug.air, it will install the application and it should just work for you, Mac, PC or Linux. (I didn't test it on all the platforms but I'm crossing my fingers). If you don't have the AIR runtime, get it here.

The way I packaged the AIR application, you should be able to right-click and View Source to see how things are done. It's a pretty simple application (that was the point - to write as little code as possible while still managing to log into SmugMug, download a list of albums, let you choose an album and a photo, and upload them).

I used the Cairngorm prescriptive micro-architecture (I love that phrase) to build the app, and although it took a little getting used to, like many others, after some orientation time, I found the structure was actually a benefit, not a drawback. It could use some wizard support though.

Anyway, I'm not claiming this tool is all that useful in it's current form, but it's a start, and if you're looking to work with the SmugMug API in AIR, it's at least some code to refer to. I'd love to hear any comments.