yql.js revision e185b559bf5512df7169f7901db9b2ec3771260b
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp * This class adds a sugar class to allow access to YQL (http://developer.yahoo.com/yql/).
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp * @module yql
c7ba96d16d58075a9ab8d5c1e46c6c83ce11cb4eTripp * Utility Class used under the hood my the YQL class
828c58761d90445b8b9d20a82d85dc1479317f71Tripp * @class YQLRequest
c7ba96d16d58075a9ab8d5c1e46c6c83ce11cb4eTripp * @constructor
828c58761d90445b8b9d20a82d85dc1479317f71Tripp * @param {String} sql The SQL statement to execute
c7ba96d16d58075a9ab8d5c1e46c6c83ce11cb4eTripp * @param {Function/Object} callback The callback to execute after the query (Falls through to JSONP).
c7ba96d16d58075a9ab8d5c1e46c6c83ce11cb4eTripp * @param {Object} params An object literal of extra parameters to pass along (optional).
e7c7565d9550eaa87043aef0df77125ada996deaTripp * @param {Object} params An object literal of configuration options (optional): proto (http|https), base (url)
e7c7565d9550eaa87043aef0df77125ada996deaTripp var YQLRequest = function (sql, callback, params, opts) {
e7c7565d9550eaa87043aef0df77125ada996deaTripp var qs = '', url = ((opts && opts.proto) ? opts.proto : Y.YQLRequest.PROTO);
828c58761d90445b8b9d20a82d85dc1479317f71Tripp url += ((opts && opts.base) ? opts.base : Y.YQLRequest.BASE_URL) + qs;
828c58761d90445b8b9d20a82d85dc1479317f71Tripp * @property PROTO
828c58761d90445b8b9d20a82d85dc1479317f71Tripp * @description Default protocol to use: http
828c58761d90445b8b9d20a82d85dc1479317f71Tripp * @property BASE_URL
828c58761d90445b8b9d20a82d85dc1479317f71Tripp * @description The base URL to query: query.yahooapis.com/v1/public/yql?
828c58761d90445b8b9d20a82d85dc1479317f71Tripp YQLRequest.BASE_URL = ':/'+'/query.yahooapis.com/v1/public/yql?';
828c58761d90445b8b9d20a82d85dc1479317f71Tripp * @property ENV
828c58761d90445b8b9d20a82d85dc1479317f71Tripp * @description The environment file to load: http://datatables.org/alltables.env
828c58761d90445b8b9d20a82d85dc1479317f71Tripp YQLRequest.ENV = 'http:/'+'/datatables.org/alltables.env';
828c58761d90445b8b9d20a82d85dc1479317f71Tripp * This class adds a sugar class to allow access to YQL (http://developer.yahoo.com/yql/).
828c58761d90445b8b9d20a82d85dc1479317f71Tripp * @class YQL
828c58761d90445b8b9d20a82d85dc1479317f71Tripp * @constructor
828c58761d90445b8b9d20a82d85dc1479317f71Tripp * @param {String} sql The SQL statement to execute
828c58761d90445b8b9d20a82d85dc1479317f71Tripp * @param {Function} callback The callback to execute after the query (optional).
828c58761d90445b8b9d20a82d85dc1479317f71Tripp * @param {Object} params An object literal of extra parameters to pass along (optional).
828c58761d90445b8b9d20a82d85dc1479317f71Tripp}, '@@VERSION@@');