Commit eeadeabb authored by Mael NICOLAS's avatar Mael NICOLAS

[WIP] Done rows

parent 6a74498b
......@@ -12,7 +12,7 @@ main :: IO ()
main = do
manager' <- newManager tlsManagerSettings
res <- runClientM
(search ["docid"] ["docType_s:(THESE OR HDR)"] (asc "docid"))
(search ["docid"] ["docType_s:(THESE OR HDR)"] (asc "docid") (Just 1))
(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
-- use rows to make the request only return the x number of result
:> QueryParam "rows" Int
:> Get '[JSON] Response
-- Get's argument type
......@@ -62,5 +64,6 @@ halAPI = Proxy
search :: [Text]
-> [Text]
-> Maybe SortField
-> 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