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

Default max page number

parent 6821f416
......@@ -29,7 +29,7 @@ runIstexScrollAPIClient cmd = do
runClientM cmd (mkClientEnv manager' $ BaseUrl Https "api.istex.fr" 443 "document")
maxScrollPages :: Int
maxScrollPages = 10
maxScrollPages = 1000
getMetadataScroll :: Text -> Text -> Maybe Text -> Int -> IO (Either ClientError Documents)
getMetadataScroll q scroll scrollId page = do
......
......@@ -62,15 +62,15 @@ L.makeLenses ''Document
instance FromJSON Document where
parseJSON (Object o) = do
_document_id <- o .: "id"
_document_title <- o .:? "title"
_document_authors <- o .: "author" <|> pure []
_document_id <- o .: "id"
_document_title <- o .:? "title"
_document_authors <- o .: "author" <|> pure []
_document_abstract <- o .:? "abstract"
_document_sources <- o .: "refBibs" <|> pure []
mPubDate <- o .:? "publicationDate"
_document_sources <- o .: "refBibs" <|> pure []
mPubDate <- o .:? "publicationDate"
pure $ Document { _document_publicationDate = parsePubDate mPubDate
, .. }
pure $ Document { _document_publicationDate = parsePubDate mPubDate, .. }
data Documents = Documents
{ _documents_total :: Int
, _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