I've just started reviewing the new api so I can update my Controller for Mote app, and I note that the returned JSON does not neatly encapsulate each channel like it could. While not an insurmountable problem, it does make parsing a little messier than it could be, especially when using libraries which can extract objects from JSON.
One potential alternative format would be as follows:
This would encapsulate a channel object nicely, and allow libraries (for example Retrofit) to easily parse channel information. I could probably provide a PR for this if interested, but I won't spend time on it if it's not likely to be accepted, since it is a big change.
If this is accepted, then I would also suggest this qualifies for a version bump since it is a breaking change, and highlights why a version endpoint could be useful per Issue #14.
I've just started reviewing the new api so I can update my Controller for Mote app, and I note that the returned JSON does not neatly encapsulate each channel like it could. While not an insurmountable problem, it does make parsing a little messier than it could be, especially when using libraries which can extract objects from JSON.
One potential alternative format would be as follows:
This would encapsulate a channel object nicely, and allow libraries (for example Retrofit) to easily parse channel information. I could probably provide a PR for this if interested, but I won't spend time on it if it's not likely to be accepted, since it is a big change.
If this is accepted, then I would also suggest this qualifies for a version bump since it is a breaking change, and highlights why a version endpoint could be useful per Issue #14.