go-ecobee
go-ecobee copied to clipboard
Add SelectionOptions type and refactor GetThermostat to use them
I wanted to be able to configure GetThemostat selection data, and you have a TODO to allow for this, so I created a SelectionOption type which can be passed into GetThermostat to set specific selection options when making a request.
I modified the GetThermostat to take the options as a variadic parameter, so the change should be backwards compatible.
Originally, the option funcs were all With<SettingName>
but that seemed redundant, so removed the With.
I can undo the formatting changes made by gofmt if you prefer.