aboutsummaryrefslogtreecommitdiff
path: root/lib/Web/OpenWeatherMap/Types/City.hs
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2020-04-19 12:26:49 +0200
committerIgor Pashev <pashev.igor@gmail.com>2020-04-19 16:30:08 +0200
commit0b1981ef40404802a828f2a91ecadba3c2453034 (patch)
tree4471665b7598940cf75b954e78d49cfcce8d4453 /lib/Web/OpenWeatherMap/Types/City.hs
parent3f86e251e8566c36e75bb5b6f8657ad5e0d120dd (diff)
downloadopenweathermap-0b1981ef40404802a828f2a91ecadba3c2453034.tar.gz
Add forecast weather API
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)