Commit a34bb341 authored by Alexandre Delanoë's avatar Alexandre Delanoë

Default max page number

parent 6821f416
...@@ -29,7 +29,7 @@ runIstexScrollAPIClient cmd = do ...@@ -29,7 +29,7 @@ runIstexScrollAPIClient cmd = do
runClientM cmd (mkClientEnv manager' $ BaseUrl Https "api.istex.fr" 443 "document") runClientM cmd (mkClientEnv manager' $ BaseUrl Https "api.istex.fr" 443 "document")
maxScrollPages :: Int maxScrollPages :: Int
maxScrollPages = 10 maxScrollPages = 1000
getMetadataScroll :: Text -> Text -> Maybe Text -> Int -> IO (Either ClientError Documents) getMetadataScroll :: Text -> Text -> Maybe Text -> Int -> IO (Either ClientError Documents)
getMetadataScroll q scroll scrollId page = do getMetadataScroll q scroll scrollId page = do
......
...@@ -69,8 +69,8 @@ instance FromJSON Document where ...@@ -69,8 +69,8 @@ instance FromJSON Document where
_document_sources <- o .: "refBibs" <|> pure [] _document_sources <- o .: "refBibs" <|> pure []
mPubDate <- o .:? "publicationDate" mPubDate <- o .:? "publicationDate"
pure $ Document { _document_publicationDate = parsePubDate mPubDate pure $ Document { _document_publicationDate = parsePubDate mPubDate, .. }
, .. }
data Documents = Documents data Documents = Documents
{ _documents_total :: Int { _documents_total :: Int
, _documents_hits :: [Document] , _documents_hits :: [Document]
......
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