Quickstart with YQL and HTTParty with Rails

YQL makes it super-easy to consume data in your web app through a unified SQL-like API. And HTTParty by John Nunemakers makes HTTP really easy. A perfect match.

In environment.rb:

Now, just create a model. Be sure to use the public endpoint for now, as the others need oauth authentication.

In you controller:

And your view (for example):

Be sure to check the API docs of YQL for many other options and watch the excellent screencasts by Christian Heilmann in the YUI theater and elsewhere. The possibilities are endless.

Posted: 05 August 2010

comments powered by Disqus