diff options
author | Joris | 2015-08-30 21:17:27 +0200 |
---|---|---|
committer | Joris | 2015-08-30 21:17:27 +0200 |
commit | c4eb771fa09e3972106d80ada6b3c4a023b85249 (patch) | |
tree | 9214b64628e34089b73ff6b4bdcb0edbc668a51e /src/Model/URL.hs |
Fetch perfumes according to multiple materials
Diffstat (limited to 'src/Model/URL.hs')
-rw-r--r-- | src/Model/URL.hs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/Model/URL.hs b/src/Model/URL.hs new file mode 100644 index 0000000..76a9e86 --- /dev/null +++ b/src/Model/URL.hs @@ -0,0 +1,22 @@ +{-# LANGUAGE OverloadedStrings #-} + +module Model.URL + ( URL + , getIdURL + , getMaterialURL + , site + ) where + +import Data.Text (Text) +import qualified Data.Text as T + +type URL = Text + +getIdURL :: Text -> URL +getIdURL material = T.concat [site, "/ajax/global.php?term=", material] + +getMaterialURL :: Text -> URL +getMaterialURL materialId = T.concat [site, "/fiche-matiere-", materialId, ".php"] + +site :: URL +site = "http://olfatheque.com" |