aboutsummaryrefslogtreecommitdiff
path: root/src/Model/URL.hs
blob: 76a9e86c64c4d1958d500b646b1e06939496f82e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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"