{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeOperators #-}
module TmpProc.Example2.Client
(
fetch
, create
) where
import Servant.API ((:<|>) (..))
import Servant.Client (ClientM, client)
import TmpProc.Example2.Routes (contactsAPI)
import TmpProc.Example2.Schema (Contact, ContactID)
fetch :: ContactID -> ClientM Contact
create :: Contact -> ClientM ContactID
(ContactID -> ClientM Contact
fetch :<|> Contact -> ClientM ContactID
create) = Proxy ContactsAPI -> Client ClientM ContactsAPI
forall api.
HasClient ClientM api =>
Proxy api -> Client ClientM api
client Proxy ContactsAPI
contactsAPI