Software engineering notes

Ruby YQL utility function example

I can’t tell whether it’s YQL, Ruby, or my lil’ YQL utility function, but I’m having fun. Here’s an example of usage:

json = yql(%{
  use '' as github;
  select * from github where id = 'yql' and repo = 'yql-tables'

Dig the multiline string syntax (inspiration: benschwarz’s Smoke gem). YQL allows POST requests for select statements (to work around URL-length limits), so I can continue to use POST for everything šŸ™‚

Written by Erik

February 18, 2010 at 1:49 am

Posted in code

Tagged with ,

%d bloggers like this: