balena-io-modules / pinejs-client-js

4 stars 4 forks source link

Add polling capability to `get` method #51

Closed LucianBuzzo closed 6 years ago

LucianBuzzo commented 6 years ago

Connects to #50

change-type: minor

resin-jenkins commented 6 years ago

Can one of the admins verify this patch?

thgreasi commented 6 years ago

Just adding a thought on this: how about having a separate method for polls instead of changing the return type based on the parameters? Eg .poll() or .getEventEmitter() I imagine in the future that we could have a .getObservable() (when the get standardized).

PS: I thought that I had already commented the above, but on second read, I couldn't find such a comment.

ghost commented 6 years ago

@LucianBuzzo, status checks have failed for this PR. Please make appropriate changes and recommit.

ghost commented 6 years ago

@LucianBuzzo, status checks have failed for this PR. Please make appropriate changes and recommit.

LucianBuzzo commented 6 years ago

@Page- @thgreasi The polling has been split out into a separate method called subscribe which should be a bit more "future proof" if we ever go down the route of using socket events behind the scenes.

ghost commented 6 years ago

@LucianBuzzo, status checks have failed for this PR. Please make appropriate changes and recommit.

Page- commented 6 years ago

add to whitelist