-
Notifications
You must be signed in to change notification settings - Fork 313
Conversation
Could any of you please review these changes? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
I just would like to see some better error handling and a more verbose readme of how the websocket function works for people who might not be confident enough to dig into the source code.
lib/clients/websocket.js
Outdated
var self = this; | ||
options = options || {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Due to the breaking changes in the way the WebsocketClient
takes parameters, do you think it would be good to add the following more parameter error handling?
For example, maybe checking to ensure that options
is in fact an object, and not a string (perhaps websocketURI).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not the only case either, just a thought of one potential.
The idea is to look at this and ensure it is as backwards compatible friendly as possible, without making it mess.
README.md
Outdated
|
||
Optionally set the heartbeat mode. | ||
```javascript | ||
var websocket = new Gdax.WebsocketClient(['BTC-USD','ETH-USD'], {heartbeat: true}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here it would be good to expand upon the optional parameters (websocket URI, authentication) just so that people know more without having to dig into the code themselves to figure out how it works, or why their old implementation is breaking if they've upgraded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I'll update
@amejiarosario This needs a rebase, great patch otherwise. |
@awitherow made it backward compatible. |
@amejiarosario Thanks a lot! We should update this to use the |
Adds the heartbeat option to Websocket