forecast.io backend progress
schachmat opened this issue · 10 comments
I pushed the first version of the forecast.io backend to the forecast.io branch. Some points need to be adressed before merging into master:
- double-check to implement the maximum possible of the iface in condition
- min- and max-temperature for daily data
- astronomy for daily data
- remove debugging code and commented out code
- restrict return value of
Fetch
to the requested number of days - add language flag
- add call to time machine api to get "forecast" for the passed time of the current day
- (optional) is there a better possibility to specify location other than a
lat,lon
string?
I'm having trouble using the forecast.io backend with that branch. After cloning that branch, building, changing the .wegorc, and running I get:
$ ./wego
2016/04/01 04:25:03 Could not find selected backend "forecast.io"
Also I've noticed that this branch needs to update the routine that initially creates the .wegorc file. It contains keys such as:
# wwo backend: the api KEY to use (default )
wwo-api-key=
but no corresponding key for forecast.io like this:
# forecast.io backend: the api KEY to use (default )
forecast-io-api-key=
Hm, works for me. Can you double check you actually built the version with a backends/forecast.io.go
file and did indeed run this newly built binary instead of an old one? Maybe the build process failed and you ran an old version. Also bear in mind that you have to specify the location as "LAT, LON" for this backend.
That couldn't be the case, the binaries are in different locations. The wwo one is in my $GOPATH (~/go
) and the forecast.io one is in my git directory (~/git
), the latter of which indeed has the backends/forecast.io.go
file.
How do I specify the location as "LAT, LON"? Do I do something like this in .wegorc?:
# LOCATION to be queried (default New York)
city=LAT, LON
yes, but without the space in between. Example for New York:
city=40.748,-73.985
However this will probably not fix your error.
Update! The forecast.io backend should now be in a usable state (see todo list in first post). @camelinc and other interested people: You have 48 hours to test the new backend in the forecast.io
branch, then I will push the branch onto master.
I fixed the issue I was having. My problem was that one has to use the right config key for forecast: forecast-api-key=
. I don't think that's documented anywhere @schachmat, so make sure it is. Everything works on my end.
Indeed, thanks for the feedback. I just pushed an update, so that a nice error message appears when no API key is specified.