aboutsummaryrefslogtreecommitdiff
path: root/lib/Web/OpenWeatherMap/Types/CurrentWeather.hs
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2017-06-07 16:24:05 +0300
committerIgor Pashev <pashev.igor@gmail.com>2017-06-07 16:35:08 +0300
commit6f6e3d8ec76c59d6f403725e9b2a22b8f6680714 (patch)
tree45382bc0e03032ffa09b7b63afdc45e243e60f4f /lib/Web/OpenWeatherMap/Types/CurrentWeather.hs
downloadopenweathermap-6f6e3d8ec76c59d6f403725e9b2a22b8f6680714.tar.gz
Initial version 0.0.00.0.0
Diffstat (limited to 'lib/Web/OpenWeatherMap/Types/CurrentWeather.hs')
-rw-r--r--lib/Web/OpenWeatherMap/Types/CurrentWeather.hs35
1 files changed, 35 insertions, 0 deletions
diff --git a/lib/Web/OpenWeatherMap/Types/CurrentWeather.hs b/lib/Web/OpenWeatherMap/Types/CurrentWeather.hs
new file mode 100644
index 0000000..26572a7
--- /dev/null
+++ b/lib/Web/OpenWeatherMap/Types/CurrentWeather.hs
@@ -0,0 +1,35 @@
+{-# LANGUAGE DeriveAnyClass #-}
+{-# LANGUAGE DeriveGeneric #-}
+
+module Web.OpenWeatherMap.Types.CurrentWeather (
+ CurrentWeather(..)
+) where
+
+import Prelude hiding (id)
+import GHC.Generics (Generic)
+
+import Data.Aeson (FromJSON)
+
+import Web.OpenWeatherMap.Types.Clouds (Clouds)
+import Web.OpenWeatherMap.Types.Coord (Coord)
+import Web.OpenWeatherMap.Types.Main (Main)
+import Web.OpenWeatherMap.Types.Sys (Sys)
+import Web.OpenWeatherMap.Types.Weather (Weather)
+import Web.OpenWeatherMap.Types.Wind (Wind)
+
+-- | Response to requests for current weather.
+-- Refer to <https://openweathermap.org/current>.
+data CurrentWeather = CurrentWeather
+ { coord :: Coord
+ , weather :: [Weather]
+ , base :: String
+ , main :: Main
+ , wind :: Wind
+ , clouds :: Clouds
+ , dt :: Int
+ , sys :: Sys
+ , id :: Int
+ , name :: String
+ , cod :: Int
+ } deriving (Show, Generic, FromJSON)
+