Requests.js: update documentation
This commit is contained in:
parent
987c7ea801
commit
a737bca563
1 changed files with 12 additions and 12 deletions
|
@ -31,9 +31,9 @@ Ox.get = function(url, callback) {
|
|||
/*@
|
||||
Ox.getAsync <f> Runs an asynchonous loader for an array of URLs
|
||||
(urls, get, callback) -> <u> undefined
|
||||
urls <s|a> URL or array of URLs or arrays of such arrays
|
||||
urls <s|a> 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 <f> Asynchronous function that loads a URL (for example Ox.get)
|
||||
url <s> URL
|
||||
callback <f> Callback function
|
||||
|
@ -42,10 +42,10 @@ Ox.getAsync <f> Runs an asynchonous loader for an array of URLs
|
|||
code <n> Status code
|
||||
text <s> Status text
|
||||
callback <f> Callback function
|
||||
results <o|{}> Results, or empty on error
|
||||
Keys are file names, values are results
|
||||
errors <o|{}> 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 <o|null> 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 <f> Get and parse one or more remote JSON files
|
|||
url <s|a> One or more remote URLs
|
||||
callback <f> 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 <o|null> 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 <f> Get and parse a remote JSONC file
|
|||
url <s|a> One or more remote URLs
|
||||
callback <f> 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 <o|null> 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 <f> Get and parse one or more remote JSONP files
|
|||
{callback} gets replaced with jsonp callback function name
|
||||
callback <f> 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 <o|null> 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);
|
||||
|
|
Loading…
Reference in a new issue