csainty/node-raven — pull request #1 by csainty (2012-05-17 06:40:08+00:00)
Title: Big API Refactor

Refactored the API to follow better API design principles.

Basically the main principle is that all async methods now callback with a common pattern of `function (error, result) { }`
This fits better with the node.js practice and makes it easier to use the library with other async flow control libraries that expect this callback pattern.

Where there used to be a single value in the response, eg `HiLoKeyGenerator.generateDocumentKey()` which would callback `callback(error, 'key')` it now wraps the result in an object `callback(error, { key: 'key' })`
This future proofs the callback so that if one day more data needs to be returned it can just be tacked on as another property without causing a breaking change.

Where there were multiple return results previously eg `Client.getDocument()` which would callback `callback(error, httpResponse, document)` it now wraps these as `callback(error, { document: { }, response: { }})`.

See the comments and tests for the names of the new callback properties.