Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
istex
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
crawlers
istex
Commits
1b4074a0
Commit
1b4074a0
authored
Sep 16, 2019
by
Mael NICOLAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update README.md
parent
daeae803
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
1 deletion
+33
-1
README.md
README.md
+33
-1
No files found.
README.md
View file @
1b4074a0
# 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
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment