unpoller / unifi

Go Library (w/ structures) to grab data from a Ubitquiti UniFi Controller
https://golift.io/discord
MIT License
114 stars 22 forks source link

Add FlexBool type and output failed payloads in debug mode. #3

Closed davidnewhall closed 5 years ago

davidnewhall commented 5 years ago

This closes https://github.com/davidnewhall/unifi-poller/issues/15 by converting the up parameters in the API to a new FlexBool type that can accept a string or a boolean.

Additionally improves debug logging when an unmarshal error is encountered. The full payload that failed to parse is printed to screen so it can be further inspected.