0.0.1 • Published 10 years ago

xero-express v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
10 years ago

Express middleware for Xero

Install

npm install xero-express

Use

Note: Only a few entities are supported at the moment.

var xero = require('xero-express');

server.use('/xero', xero({
  key: 'XERO_KEY',
  secret: 'XERO_SECRET',
  rsa: 'XERO_RSA'
}));

The config object passed to xero() has an optional responder property that lets you override the default responder. For example:

server.use('xero/*', xero({
  key: 'XERO_KEY',
  secret: 'XERO_SECRET',
  rsa: 'XERO_RSA',
  responder: function (err, json, res) {
    console.log(json);
    res.json(404, {});
  }
}));