Commit 85e6936e authored by Mael NICOLAS's avatar Mael NICOLAS

[WIP] Done implementing start

parent eeadeabb
......@@ -12,7 +12,7 @@ main :: IO ()
main = do
manager' <- newManager tlsManagerSettings
res <- runClientM
(search ["docid"] ["docType_s:(THESE OR HDR)"] (asc "docid") (Just 1))
(search ["docid"] ["docType_s:(THESE OR HDR)"] (asc "docid") (Just 1) (Just 2))
(mkClientEnv manager' $ BaseUrl Https "api.archives-ouvertes.fr" 443 "")
case res of
(Left err) -> print err
......
......@@ -23,6 +23,8 @@ type Search = "search"
:> QueryParams "fq" Text
-- preatty much clear, (Asc || Desc) + field you want to sort by
:> QueryParam "sort" SortField
-- permit to start a the x result
:> QueryParam "start" Int
-- use rows to make the request only return the x number of result
:> QueryParam "rows" Int
:> Get '[JSON] Response
......@@ -65,5 +67,6 @@ search :: [Text]
-> [Text]
-> Maybe SortField
-> Maybe Int
-> Maybe Int
-> ClientM Response
search = client halAPI
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment