module CrystalWeather
Overview
CrystalWeather
is a library that provides tools to easily fetch weather data from OpenWeatherMap.
Defined in:
api.crcrystal-weather.cr
types/current.cr
types/exceptions.cr
types/forecast.cr
types/misc.cr
Constant Summary
-
API_URL =
"https://api.openweathermap.org/data/2.5"
-
The URL of the OpenWeatherMap API
-
CONDITION_EMOJIS =
{"01d" => '☀', "02d" => '⛅', "03d" => '☁', "04d" => '☁', "09d" => '🌧', "10d" => '🌦', "11d" => '🌩', "13d" => '🌨', "50d" => '🌫'}
-
All condition codes translated to emojis
-
LANGS =
["ar", "bg", "ca", "cz", "de", "el", "fa", "fi", "fr", "gl", "hr", "hu", "it", "ja", "kr", "la", "lt", "mk", "nl", "pl", "pt", "ro", "ru", "se", "sk", "sl", "es", "tr", "ua", "vi", "zh_cn", "zh_tw", "en"] of ::String
-
The list of the languages accepted by the API
-
UNITS_FORMATS =
["default", "metric", "imperial"] of ::String
-
The list of the units formats available
-
VERSION =
"0.1.0"