Closed triangle-man closed 3 years ago
This interface should:
On the last point, the contracts guarantee that the values in the returned structs are of the appropriate type. I think we don't need to protect the structs against misuse outside the library.
Actually, on reflection, I think we want a lower layer which handles authentication and connection to the Forecast server, and returns the json as returned by Forecast; then a layer on top of that to convert to more sensible datatypes.
Also, on reflection, I think I won't try to hide the connection details (ie, which Forecast instance we are connecting to) in the library; instead, we'll pass a connection object to each request. It's not too much hassle.
First pass: