golang-project

module
v0.0.0-...-a3b1edf Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: Apache-2.0

README

  1. Зайдіть у cmd/weather/config.yaml та вставте свій api key з сайту - https://openweathermap.org/ Щоб запустити проект виконайте команду make dev

  2. Перш за все, вам потрібно зареєструватись

http://localhost:8888/signUp POST { "first_name":"John", "last_name":"Doe", "email":"[email protected]", "password":"secret" }

Потім залогіньтесь, отримайте jwt і робіть з ним запит для отримання погоди http://localhost:8888/login POST { "email":"[email protected]", "password":"secret" }

  1. Приклади запитів: http://localhost:8888/api/forecast/now?latitude=52.5200&longitude=13.4050 http://localhost:8888/api/forecast/now?city=London&date=1637059200 http://localhost:8888/api/forecast/now?city=New York http://localhost:8888/api/forecast/history - отрмання з бази даних записаних раз на годину

Jump to

Keyboard shortcuts

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