Added wind route and started forecast endpoint

This commit is contained in:
2025-06-17 17:38:31 +02:00
parent cbafd785b9
commit 9e419ec7bf
9 changed files with 378 additions and 18 deletions

View File

@@ -11,7 +11,7 @@ import (
"github.com/ceticamarco/zephyr/types"
)
func getEmoji(condition string, isNight bool) string {
func GetEmoji(condition string, isNight bool) string {
switch condition {
case "Thunderstorm":
return "⛈️"
@@ -101,7 +101,7 @@ func GetWeather(city *types.City, apiKey string) (types.Weather, error) {
// Get emoji from weather condition
isNight := strings.HasSuffix(weather.Current.Weather[0].Icon, "n")
emoji := getEmoji(condition, isNight)
emoji := GetEmoji(condition, isNight)
return types.Weather{
Date: weatherDate,