5

GitHub - gocoder-ai/open-weather: A Weather API prototype implementation

 2 years ago
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.
neoserver,ios ssh client

Open Weather

A Weather API prototype implementation

Usage

Get an API Weather Key from:

https://openweathermap.org/

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:

https://openweathermap.org/current


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK