1.0.1 • Published 10 years ago

realmapi v1.0.1

Weekly downloads
4
License
ISC
Repository
github
Last release
10 years ago

##A wrapper for the RotMG API

npm install realmapi

###usage

realmapi(path, options, callback)

  • path: the path you want to query, for example char/list or app/init
  • options: (optional) object with parameters for the query; see paths definition in index.js for available and required parameters for each path
    • options.host: optionally choose which domain to query: testing, production, or specify your own; defaults to production
  • 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 succeeded
    • err is set even if the request succeeded and the response was <Failure> or <Error>
    • res is always a parsed json representation of the response, be it xml or json originally. For xml, explicitArray is off and mergeAttrs is on, read xml2js docs for details.

###example

see example.js

1.0.1

10 years ago

1.0.0

10 years ago

0.0.2

11 years ago

0.0.1

11 years ago