Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
148
Issues
148
List
Board
Labels
Milestones
Merge Requests
7
Merge Requests
7
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
haskell-gargantext
Commits
3bbb49a9
Verified
Commit
3bbb49a9
authored
Nov 15, 2023
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[epo] implement limit
parent
32920384
Pipeline
#5356
failed with stages
in 3 minutes and 50 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
EPO.hs
src/Gargantext/Core/Text/Corpus/API/EPO.hs
+2
-2
No files found.
src/Gargantext/Core/Text/Corpus/API/EPO.hs
View file @
3bbb49a9
...
...
@@ -33,11 +33,11 @@ get Nothing _ _ _ _ = do
-- throwIO $ EPO.OtherError "AuthKey is required"
pure
$
Left
$
ConnectionError
$
toException
$
ErrorCall
"AuthKey is required"
get
(
Just
authKey
)
epoAPIUrl
q
lang
mLimit
=
do
let
_limit
=
Corpus
.
getLimit
$
fromMaybe
10000
mLimit
let
limit
=
Corpus
.
getLimit
<$>
mLimit
case
parseURI
(
T
.
unpack
epoAPIUrl
)
of
Nothing
->
pure
$
Left
$
ConnectionError
$
toException
$
ErrorCall
"Cannot parse API URL"
Just
apiUrl
->
do
eRes
<-
EPO
.
searchEPOAPIC
apiUrl
authKey
Nothing
(
Just
30
)
(
Corpus
.
getRawQuery
q
)
eRes
<-
EPO
.
searchEPOAPIC
apiUrl
authKey
Nothing
limit
(
Corpus
.
getRawQuery
q
)
pure
$
(
\
(
total
,
itemsC
)
->
(
Just
total
,
itemsC
.|
mapC
(
toDoc
lang
)))
<$>
eRes
-- EPO.Paginated { .. } <- EPO.searchEPOAPI apiUrl authKey 1 20 (Corpus.getRawQuery q)
...
...
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