1.0.1 • Published 10 years ago
realmapi v1.0.1
##A wrapper for the RotMG API
npm install realmapi
###usage
realmapi(path, options, callback)
path: the path you want to query, for examplechar/listorapp/initoptions: (optional) object with parameters for the query; seepathsdefinition inindex.jsfor available and required parameters for each pathoptions.host: optionally choose which domain to query:testing,production, or specify your own; defaults toproduction
callback(err, res): a node-style callback function; if you don't specify it, the query will still be executed but you will never know if it succeedederris set even if the request succeeded and the response was<Failure>or<Error>resis always a parsed json representation of the response, be it xml or json originally. For xml,explicitArrayis off andmergeAttrsis on, readxml2jsdocs for details.
###example
see example.js