programatic API - #2
Open
cancerberoSgx wants to merge 6 commits into
Open
cancerberoSgx wants to merge 6 commits into
cancerberoSgx wants to merge 6 commits into
Conversation
added 6 commits
January 24, 2018 23:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since you are calling credentials() function from index, basically this project is unusable programatically from other tools (that might obtain credentials differently). I changes the API so methods are not automatically called so I can provide credentials using other methods (see test/test1.js)
Also I removed Q dependency and use native Promise
Also I tried to refactor a little bit to use es6 features like arrow functions, const, let, etc
also init() now accept a single objject parameter with credentials and configuration.
Also logging is configurable passing debug: false in init() so is silent
tried to adjust the README to reflect these changes.
probably will correct / enhance more around this and add some integration tests and travis, but before wanted to know your opinion. Thanks