Posts tagged “api”
2/5 Stop doing it yourself and use CPAN — curvr-0.2 (0)
Just like the career of the average software engineer, Curvr has now grown up just a bit and started reusing other people’s code.
Dopplr integration in curvrmail
Geotagging is awesome but a bit of a pain to automate with any kind of accuracy. I’m making a compromise here by automatically tagging things using my location according to Dopplr. I had this working with my original PHP curvrmail script but have since switched to using Flickr::Upload::Dopplr just to practice some Perl.
AutoManual image rotation
Since my N73 isn’t friendly enough to rotate pictures for me, I’ve added a way to specify rotation in the email you send to Curvr. Prefixing with “L ” or “l ” will rotate 90 degrees counterclockwise and prefixing with “R ” or “r ” will rotate 90 degrees clockwise. Note in both cases that it is a letter followed by a space followed by the normal title/tags syntax.
It is a bit awkward to think about in terms of left and right, since I could either be talking about the direction you rotated the camera or the direction the photo should be rotated (which itself could be rather ambiguous, so we’ll say that it is relative to the top). So here’s the official word: the rotate syntax wants to know which direction you rotated the camera to take the picture.
curvrconf for getting API tokens
Getting tokens for the Flickr and Dopplr API, while not something you need to do often, is quite a drag. Enter curvrconf, the copy-and-paste simple way to get your tokens out. All it needs is to be setup with the same API key as curvrmail and it’ll guide you through grabbing tokens. For the Flickr API, setup your key for web-based auth and give it a garbage URL to return to (I use http://localhost:81/).
As usual, the API key is up to you. I accidentally committed my keys/secrets/tokens to Subversion but have expired all of them so don’t even bother trying to steal my accounts.
Anti-blue C code
The main curvr program has for a long time introduced some strange blue artifacts into my photos. I figured this was due to some underflow or overflow issues with my color maps. I finally took the time to do some serious experimentation and it turns out that if I just favor a stronger red channel in these edge cases, the artifacts seem to go away. Strange and beautiful indeed. I can’t fully explain the phenomenon but believe it’s somehow related to my using the red channel as my indicator of color value (as many photographers do when converting to black & white).
So there it is, curvr-0.2.
Er, here it is: http://svn.rcrowley.org/svn/curvr/tags/curvr-0.2
10/30 Meebo platform needs to come to XULRunner (4)
Today Om is reporting that Meebo is launching its own platform for third-party Meebo widgets. I could care less about the widgets, but could this be a REST API for sending IMs? No (dammit).
The Meebo API is actually an ingenious bit of Flash with a JavaScript wrapper that talks to Meebo. Once your hosted app gets some params from Meebo, you can do exciting things like listen for new messages. Through the same JavaScript-wrapped Flash object, you can also send messages. Praise be! For more, check out the Meebo JavaScript docs, which are minimal to say the least. Oh well, there’s sample code.
A couple weeks back, Instantbird did a lap around the Internet. I must call failure here, because when I tried to sign into Yahoo! Messenger it crashed immediately, spectacularly and consistently (tried four times). I know what you’re thinking: but Yahoo! Messenger is a closed system, of course there will be problems. Yeah, but Adium is built on the same library and pretty much always signs in happily (but never, ever shows me when Cal is online).
Seeing as Instantbird is built on XULRunner (my new life partner), a nice JavaScript way to send IMs would be just sweet. From my limited research, it seems embedding Flash in XULRunner is possible, as is opening a browser window within Instantbird to snag the authentication params from Meebo. Then it’s smooth sailing. Maybe.
The glaring hole in all of this is that while you can sendMsg to your heart’s content, thus far you have no one to send to. This isn’t a full-blown API, folks. It’s a widget platform. There’s no way to get at someone’s buddy list. Back to libpurple, I suppose. But if Meebo made the rest of their service available as a REST API (to complement the far superior Flash method of sending/receiving messages), I’d be sold.