diff --git a/jquery.yql.js b/jquery.yql.js index 744de89..a79b861 100644 --- a/jquery.yql.js +++ b/jquery.yql.js @@ -72,6 +72,16 @@ $.ajax(yqlJson); return $self.toReturn; + }, + yqlJSON: function(url, callback) { + return $.yql("SELECT * FROM json WHERE url=#{url}", {url: url}, function(data) { + callback(data.query.results && data.query.results.json); + }); + }, + yqlXML: function(url, callback) { + return $.yql("SELECT * FROM xml WHERE url=#{url}", {url: url}, function(data) { + callback(data.query.results); + }); } } );