callback syntax inconsistent
petele opened this issue · 2 comments
petele commented
The callback syntax is inconsistent across Sonos
and Player
. In Player
, it appears to be callback(success, message)
, where success
is a true
/false
boolean. While in Sonos
it's callback(error, message)
, where error
is either null
or the actual error.
Most other libraries I've used follow the callback(error, message)
style and would prefer that one.
Happy to submit a PR for this if you're willing.
jishi commented
Yeah, sure, that would be an improvement. My plan is to refactor it to be completely promised-based, I think it would make sense and clean up a lot of the code since I do a lot of sequential calls, and the depending projects do it.