yqlQuery wrapper function


/ Published in: jQuery
Save to your folder(s)

Thanks to thinkvitamin.com for the wrapper / video!
http://membership.thinkvitamin.com/library/tools/yql/javascriptjquery-example


Copy this code and paste it in your HTML
  1. function yqlQuery(query, callback){
  2. var yqlURL = "http://query.yahooapis.com/v1/public/yql";
  3. var data = {
  4. q: query,
  5. format: 'json',
  6. env: 'store://datatables.org/alltableswithkeys'
  7. }
  8.  
  9. $.get(yqlURL, data, callback, 'jsonp');
  10. }
  11.  
  12. yqlQuery('select * from geo.places where text="Orlando"', function(response){
  13. console.log(response);
  14. })

URL: http://thinkvitamin.s3.amazonaws.com/membership/code-samples/YQL_jQuery_Example.zip

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.