aboutsummaryrefslogtreecommitdiff
path: root/lib/Web/OpenWeatherMap/Types/City.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Web/OpenWeatherMap/Types/City.hs')
-rw-r--r--lib/Web/OpenWeatherMap/Types/City.hs21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/Web/OpenWeatherMap/Types/City.hs b/lib/Web/OpenWeatherMap/Types/City.hs
new file mode 100644
index 0000000..bb6cd6d
--- /dev/null
+++ b/lib/Web/OpenWeatherMap/Types/City.hs
@@ -0,0 +1,21 @@
+{-# LANGUAGE DeriveAnyClass #-}
+{-# LANGUAGE DeriveGeneric #-}
+
+module Web.OpenWeatherMap.Types.City
+ ( City(..)
+ ) where
+
+import GHC.Generics (Generic)
+
+import Data.Aeson (FromJSON)
+
+import Web.OpenWeatherMap.Types.Coord (Coord)
+
+data City = City
+ { name :: String
+ , country :: Maybe String
+ , coord :: Coord
+ , timezone :: Int
+ , sunset :: Int
+ , sunrise :: Int
+ } deriving (Show, Generic, FromJSON)