diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2020-04-19 12:26:49 +0200 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2020-04-19 16:30:08 +0200 |
commit | 0b1981ef40404802a828f2a91ecadba3c2453034 (patch) | |
tree | 4471665b7598940cf75b954e78d49cfcce8d4453 /lib/Web/OpenWeatherMap/Types/ForecastWeather.hs | |
parent | 3f86e251e8566c36e75bb5b6f8657ad5e0d120dd (diff) | |
download | openweathermap-0b1981ef40404802a828f2a91ecadba3c2453034.tar.gz |
Add forecast weather API
Diffstat (limited to 'lib/Web/OpenWeatherMap/Types/ForecastWeather.hs')
-rw-r--r-- | lib/Web/OpenWeatherMap/Types/ForecastWeather.hs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/Web/OpenWeatherMap/Types/ForecastWeather.hs b/lib/Web/OpenWeatherMap/Types/ForecastWeather.hs new file mode 100644 index 0000000..fa8e50a --- /dev/null +++ b/lib/Web/OpenWeatherMap/Types/ForecastWeather.hs @@ -0,0 +1,20 @@ +{-# LANGUAGE DeriveAnyClass #-} +{-# LANGUAGE DeriveGeneric #-} + +module Web.OpenWeatherMap.Types.ForecastWeather + ( ForecastWeather(..) + ) where + +import GHC.Generics (Generic) + +import Data.Aeson (FromJSON) + +import Web.OpenWeatherMap.Types.City (City) +import Web.OpenWeatherMap.Types.Forecast (Forecast) + +-- | Response to requests for forecast weather. +-- Refer to <https://openweathermap.org/forecast5>. +data ForecastWeather = ForecastWeather + { list :: [Forecast] + , city :: City + } deriving (Show, Generic, FromJSON) |