Java client based on http://www.infoq.com/presentations/web-api-html