Open danielsjf opened 6 years ago
Sounds good. The Awair API calls themselves typically use the type and ID number as inputs. By using the name, I”m first doing a lookup of the get_all_devices and then doing a compare of the desired name to see if anything matches.
Do you see this more in the docstring or the documentation examples? I would tend to put this in the docstring, but willing to consider either way.
Thoughts?
I was also thinking about the docstring :-) But I guess it won't harm anyone to also mention it in the examples.
@danielsjf Coming back to this. Where are we at with this? Close it? Fix it?
I saw that some functions for the data (e.g. get_current_air_data) have up to 3 API calls. It could be good to specify this in the documentation. I don't know to what extend the API lends itself to directly call a function based upon the name (instead of type and ID).
On a side note, you could also explain how the name or the type + ID is necessary in the docs. You could also do a quick test to see which parameters are supplied. For instance, if all three are reported, throw an error. Only if name or (type and ID) are supplied it should return something.