edwardhotchkiss/github3 — pull request #12 by tjmehta (2012-06-08 03:31:25+00:00)
Title: Made the class instanceable and made the requests streamable. (resolved issues 10 and 11)

The module should be fully backwards compatible, but please take special notice to commit1-5 (below).

Summary of Changes:

[commit1] Made the class instanceable.
1) Capitalized 'github3' to 'Github3' since it is an instanceable class now.
2) Updated constructor to take options.
3) Moved default values to constructor.
4) Added createInstance function which exports an instance of Github3.
5) Also, changed the module.exports to support backwards compatibility for now (by exporting an instance of Github3), but it should be updated in the future (please read the comment above module.exports).
6) Moved all methods to prototype (so they can be used in the instances).
7) Updated internal 'github3' references to 'this'.
8) Trimmed whitespace and added missing semicolons.

[commit2] Added support for streams.
1) Methods now return the request object full through.
2) Removed method requirements for callback functions (by defaulting callback to noOp).