Commit 400374d7 authored by Mael NICOLAS's avatar Mael NICOLAS

Update README.md

parent 01a6bf1e
# pubMedCrawler
# PUBMED API Crawler
## API documentation
https://www.ncbi.nlm.nih.gov/books/NBK25501/
https://www.ncbi.nlm.nih.gov/books/NBK25501/
\ No newline at end of file
## Usage
### Entry function
The basic entry point of this crawler is the function `PUBMED.` `getMetadataWith`.
This function take a `Text` representing the query you want to run on hal
and a `Maybe Int` representing the maximum number of result you want to get.
### Return Type
The return type is a bit more tricky, it's **either** a `Text` representing an error or a collection of `PUBMED.Parser` `PubMed`.
`PubMed` is a simple type that contain every informations we need (id,title,abstract,publicationDate,sources).
### Exemple
Here is a basic main using the entry point of the crawler and printing the 5 first documents.
```hs
{-# LANGUAGE OverloadedStrings #-}
module Main where
import PUBMED (getMetadataWith)
main :: IO ()
main = getMetadataWith "bisphenol" (Just 5) >>= print
```
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