Skip to content

E-PSN/weather-api

 
 

Repository files navigation

weather-api

A REST API to check the current weather.

https://goweather.herokuapp.com/weather/Santorini
https://goweather.herokuapp.com/weather/{city}

Build

go build

Run

./weather-api

Usage

curl http://localhost:3000/weather/{city}

Example

Request

curl http://localhost:3000/weather/Santorini

Response

{  
   "temperature":"29 °C",
   "wind":"20 km/h",
   "description":"Partly cloudy",
   "forecast":[  
      {  
         "day":1,
         "temperature":"27 °C",
         "wind":"12 km/h"
      },
      {  
         "day":2,
         "temperature":"22 °C",
         "wind":"8 km/h"
      }
   ]
}

Releases

No releases published

Packages

No packages published

Languages

  • Go 88.6%
  • Makefile 11.4%