robertoduessmann / weather-api

A RESTful API to check the weather

Home Page:https://goweather.herokuapp.com/weather/Curitiba

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

weather-api

License Build Status Go Report Card GoDoc

A REST API to check the current weather.

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

Build locally (Mac users)

brew install dep
dep ensure
go build

Run

./weather-api

Usage

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

Example

Request

curl http://localhost:3000/weather/Curitiba

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"
      }
   ]
}

Web version

A web client of the API is also available: https://reacttempo.netlify.app/
The project can be found in https://github.com/GabrielCampos99/appTempo.

License

The MIT License (MIT)

About

A RESTful API to check the weather

https://goweather.herokuapp.com/weather/Curitiba

License:MIT License


Languages

Language:Go 91.0%Language:Makefile 9.0%