go - openweatherapi
This Repo contains golang library to query OpenWetherMaps (http://openweathermap.org/) for weather information.
Install
$ go get github.com/CombatMage/openweatherapi
Documentation
Is available on godoc
:
https://godoc.org/github.com/CombatMage/openweatherapi
Examples
Consuming the library:
q := NewQueryForCity(readAPIKey(), "Berlin,de")
resp, err := q.Weather()
fmt.Println(resp.Name)
fmt.Println(resp.Weather[0].Description)
fmt.Println(resp.Main.Temp)
See the test files for more example.
A simple client for testing is also included:
$ go build cmd/openweatherclient
$ openweatherclient -key <OpenWeather API Key> -city Berlin,de