jimmywarting / wemo-client

JavaScript client library for controlling and subscribing to Wemo Devices
MIT License
132 stars 40 forks source link

Add Get function - InsightParams #33

Closed royvandewater closed 8 years ago

codecov-io commented 8 years ago

Current coverage is 89.96% (diff: 100%)

Merging #33 into master will increase coverage by 0.26%

@@             master        #33   diff @@
==========================================
  Files             2          2          
  Lines           262        269     +7   
  Methods          54         57     +3   
  Messages          0          0          
  Branches         37         38     +1   
==========================================
+ Hits            235        242     +7   
  Misses           27         27          
  Partials          0          0          

Powered by Codecov. Last update be2ccab...5833c50

royvandewater commented 8 years ago

Regarding the identical code that CodeClimate found, I copied the implementation from the handleCallback function, I'd be happy to pull that out into a shared method and squash that into the pull request.

What's the preferred style for a helper function? I'm imagining something like WemoClient.prototype._parseInsightParams? I couldn't find a close enough precedent to copy :-)

timonreinhard commented 8 years ago

Yeah, introducing a WemoClient.prototype._parseInsightParams would be a good thing to go with.

royvandewater commented 8 years ago

Ok, this should work better then

timonreinhard commented 8 years ago

Good work, thanks for contributing!