Created
September 3, 2010 00:44
-
-
Save jcleblanc/563205 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/**************************************************** | |
* Method: Get YQL Data | |
* Description: Use the query provided to make a | |
* request to YQL endpoint to capture data | |
*****************************************************/ | |
var getYQLData = function(query){ | |
//prepare the URL for public YQL queries: | |
var sURL = yqlPublicQueryURL + "q=" + encodeURI(query) + "&format=json&callback=yqlWidget.getYQLDataCallback"; | |
//add any environment files specified in the config | |
if (setupConfig["env"]) { | |
sURL += '&env=' + escape(setupConfig["env"]); | |
} | |
//make GET request to YQL with provided query | |
var transactionObj = YAHOO.util.Get.script(sURL, { | |
onSuccess : onYQLReqSuccess, | |
onFailure : onYQLReqFailure, | |
scope : this | |
}); | |
return transactionObj; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment