weather-api

command module
v0.0.0-...-ae6ef52 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2025 License: MIT Imports: 7 Imported by: 0

README

weather-api

License Go Report Card GoDoc

A REST API to check the current weather.

http://goweather.xyz/weather/Berlin
> http://goweather.xyz/weather/{city}

Build locally (Mac users)

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

Few web clients of the API and their Projects:

  1. Client: https://reacttempo.netlify.app/
    Project: https://github.com/GabrielCampos99/appTempo

  2. Client: https://emaniaditya.github.io/weather-app
    Project: https://github.com/emaniaditya/weather-app/

  3. Client: https://weather-react-tsx.netlify.app/
    Project: https://github.com/keissiant/weather-api-react.tsx

License

The MIT License (MIT)

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
v2

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL