From a737bca563e93b61bb565a9e0c6ad99ed13f5dda Mon Sep 17 00:00:00 2001 From: rolux Date: Thu, 5 Dec 2013 00:23:36 +0100 Subject: [PATCH] Requests.js: update documentation --- source/Ox/js/Request.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/source/Ox/js/Request.js b/source/Ox/js/Request.js index 4d56bd37..6f876488 100644 --- a/source/Ox/js/Request.js +++ b/source/Ox/js/Request.js @@ -31,9 +31,9 @@ Ox.get = function(url, callback) { /*@ Ox.getAsync Runs an asynchonous loader for an array of URLs (urls, get, callback) -> undefined - urls URL or array of URLs or arrays of such arrays + urls URL or array of URLs or array of such arrays Multiple URLs in the same array will be processed simultaneously, but - multiple arrays of URLs will be processed in that order. + multiple arrays of URLs will be processed sequentially get Asynchronous function that loads a URL (for example Ox.get) url URL callback Callback function @@ -42,10 +42,10 @@ Ox.getAsync Runs an asynchonous loader for an array of URLs code Status code text Status text callback Callback function - results Results, or empty on error - Keys are file names, values are results - errors Errors, or empty on success - Keys are file names, values are error objects + results <*|o|null> Result(s), or `null` on error + For multiple URLs, keys are URLs, values are results, `{}` on error + errors Error(s), or `null` on success + For multiple URLs, keys are URLs, values are errors, `{}` on success @*/ Ox.getAsync = function(urls, get, callback) { urls = Ox.makeArray(urls); @@ -209,9 +209,9 @@ Ox.getJSON Get and parse one or more remote JSON files url One or more remote URLs callback Callback function data <*|o|null> The parsed content of the remote resource(s) - For multiple URLs, keys are file names, values are parsed contents + For multiple URLs, keys are URLs, values are parsed contents error Error(s) - For multiple URLs, keys are file names, values are error objects + For multiple URLs, keys are URLs, values are error objects @*/ Ox.getJSON = function(url, callback, isJSONC) { var urls = Ox.makeArray(url); @@ -231,9 +231,9 @@ Ox.getJSONC Get and parse a remote JSONC file url One or more remote URLs callback Callback function data <*|o|null> The parsed content of the remote resource(s) - For multiple URLs, keys are file names, values are parsed contents + For multiple URLs, keys are URLs, values are parsed contents error Error(s) - For multiple URLs, keys are file names, values are error objects + For multiple URLs, keys are URLs, values are error objects @*/ Ox.getJSONC = function(url, callback) { Ox.getJSON(url, callback, true); @@ -246,9 +246,9 @@ Ox.getJSONP Get and parse one or more remote JSONP files {callback} gets replaced with jsonp callback function name callback Callback function data <*|o|null> The parsed content of the remote resource(s) - For multiple URLs, keys are file names, values are parsed contents + For multiple URLs, keys are URLs, values are parsed contents error Error(s) - For multiple URLs, keys are file names, values are error objects + For multiple URLs, keys are URLs, values are error objects @*/ Ox.getJSONP = function(url, callback) { var urls = Ox.makeArray(url);