Towards an even more open API
Since we first released the Lingr API, by far the most frequent request that we've had was to allow embedding a chatroom in a web page. Some of our developers have actually created such things, but they all suffered from one drawback- because our API was fully REST compliant, it wasn't possible to do many interesting things purely from Javascript. The reason for this is that the REST convention is that any operation that changes state on the server should be an HTTP POST operation. That makes perfect sense, however, it kills any possibility of a purely Javascript/JSON implementation, because, while Javascript can certainly perform POST operations, it cannot do so asynchronously, nor can it retrieve the results of a POST (well, while this isn't technically true, it is practically true). The solution that most developers have taken is to proxy the POST calls through their own servers. This works fine, but, it seems like an unnecessary complication.
We were faced with a conundrum- on the one hand, we want to be REST compliant, because we're engineers and every engineer loves a nice, cut-and-dry specification. On the other hand, we want to allow pure Javascript clients to access our full API, because, as we've learned, the most interested Lingr API clients don't originate from the lingr.com domain :-)
So today, I'm happy to announce that we've opened up all of our API methods to HTTP GET operations. Even though the documentation for a particular method may still state that POST is required, in fact, on the backend, we've disabled HTTP method checking for API calls.
In addition, we've published lingr.js, a full read-only Lingr chatroom client in Javascript. While it is missing some obvious functionality (the ability to say something, for example), it is a great starting point to embedding a chatroom in your web pages. You can find documentation on lingr.js over at the Lingr Developer Wiki. We'll continue to add new functionality to lingr.js- this is just the beginning.
If you use lingr.js, please let us know, and add your creation to the Showcase. We're eager to see how people take this ball and run with it.
- Danny
Update: we have added say capability to lingr.js :-)