Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made the class instanceable and made the requests streamable. (resolved issues 10 and 11) #12

Merged
merged 2 commits into from
Jun 9, 2012

Conversation

tjmehta
Copy link
Contributor

@tjmehta tjmehta commented Jun 8, 2012

The changes I made to this 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).

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.
1) Methods now return the request object full through.
2) Removed method requirements for callback functions (by defaulting callback to noOp).
edwardhotchkiss pushed a commit that referenced this pull request Jun 9, 2012
Made the class instanceable and made the requests streamable. (resolved issues 10 and 11)
@edwardhotchkiss edwardhotchkiss merged commit 324b457 into edwardhotchkiss:master Jun 9, 2012
@edwardhotchkiss
Copy link
Owner

Publishing in 5, thanks :P

This was referenced Jun 9, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants