MDL-32843 import YUI 3.5.1
[moodle.git] / lib / yui / 3.5.1 / build / yql / yql-min.js
blobffe8bab9b3e0ec001be09cd43a78aed90db42c6f
1 /*
2 YUI 3.5.1 (build 22)
3 Copyright 2012 Yahoo! Inc. All rights reserved.
4 Licensed under the BSD License.
5 http://yuilibrary.com/license/
6 */
7 YUI.add("yql",function(b){var a=function(e,f,d,c){if(!d){d={};}d.q=e;if(!d.format){d.format=b.YQLRequest.FORMAT;}if(!d.env){d.env=b.YQLRequest.ENV;}this._params=d;this._opts=c;this._callback=f;};a.prototype={_jsonp:null,_opts:null,_callback:null,_params:null,send:function(){var c=[],d=((this._opts&&this._opts.proto)?this._opts.proto:b.YQLRequest.PROTO);b.each(this._params,function(g,f){c.push(f+"="+encodeURIComponent(g));});c=c.join("&");d+=((this._opts&&this._opts.base)?this._opts.base:b.YQLRequest.BASE_URL)+c;var e=(!b.Lang.isFunction(this._callback))?this._callback:{on:{success:this._callback}};if(e.allowCache!==false){e.allowCache=true;}if(!this._jsonp){this._jsonp=b.jsonp(d,e);}else{this._jsonp.url=d;if(e.on&&e.on.success){this._jsonp._config.on.success=e.on.success;}this._jsonp.send();}return this;}};a.FORMAT="json";a.PROTO="http";a.BASE_URL=":/"+"/query.yahooapis.com/v1/public/yql?";a.ENV="http:/"+"/datatables.org/alltables.env";b.YQLRequest=a;b.YQL=function(e,f,d,c){return new b.YQLRequest(e,f,d,c).send();};},"3.5.1",{requires:["jsonp","jsonp-url"]});