Commit 1b4074a0 authored by Mael NICOLAS's avatar Mael NICOLAS

Update README.md

parent daeae803
# Istex
# Istex API Crawler
## API documentation
https://doc.istex.fr/api/
## Usage
### Entry function
The basic entry point of this crawler is the function `ISTEX.` `getMetadataWith`.
This function take a `Text` representing the query you want to run on the istex API
and a `Maybe Int` representing the maximum number of values you want to get.
### Return Type
The return type is pretty simple, it's **either** a `ClientError` or a `ISTEX.` `Client.Documents`.
`Documents` represent a collection of `ISTEX.` `Client.Document` and the number of `Document` returned.
`Document` is a simple type that contain every informations we need (id, title,authors,abstract,publicationDate,sources).
### Exemple
Here is a basic main using the entry point of the crawler and printing the 5 first results.
```hs
{-# LANGUAGE OverloadedStrings #-}
import ISTEX
import ISTEX.Client
main :: IO ()
main = do
res <- getMetadataWith "artificial intelligence" (Just 10)
case res of
(Left err) -> print "Error"
(Right val) -> do
print $ take 5 val
```
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