GitHub - gocoder-ai/open-weather: A Weather API prototype implementation
source link: https://github.com/gocoder-ai/open-weather
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Open Weather
A Weather API prototype implementation
Usage
Get an API Weather Key from:
and paste it in .apiConfig:
{
"OpenWeatherMapApiKey":"<paste-API-key-here>"
}
You can test it by running main.go and pasting this to your browser:
http://localhost:8000/hello
Then enter this and a name of a city in your browser:
http://localhost:8000/weather/<name-of-a-city>
This format should show in your browser:
http://localhost:8000/weather/manila
{"Name":"Manila","main":{"temp":27.09}}
You can add more stats from their documentation:
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK