Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
hal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
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
hal
Commits
eeadeabb
Commit
eeadeabb
authored
Mar 07, 2019
by
Mael NICOLAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[WIP] Done rows
parent
6a74498b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
Main.hs
app/Main.hs
+1
-1
Client.hs
src/HAL/Client.hs
+3
-0
No files found.
app/Main.hs
View file @
eeadeabb
...
...
@@ -12,7 +12,7 @@ main :: IO ()
main
=
do
manager'
<-
newManager
tlsManagerSettings
res
<-
runClientM
(
search
[
"docid"
]
[
"docType_s:(THESE OR HDR)"
]
(
asc
"docid"
))
(
search
[
"docid"
]
[
"docType_s:(THESE OR HDR)"
]
(
asc
"docid"
)
(
Just
1
)
)
(
mkClientEnv
manager'
$
BaseUrl
Https
"api.archives-ouvertes.fr"
443
""
)
case
res
of
(
Left
err
)
->
print
err
...
...
src/HAL/Client.hs
View file @
eeadeabb
...
...
@@ -23,6 +23,8 @@ type Search = "search"
:>
QueryParams
"fq"
Text
-- preatty much clear, (Asc || Desc) + field you want to sort by
:>
QueryParam
"sort"
SortField
-- use rows to make the request only return the x number of result
:>
QueryParam
"rows"
Int
:>
Get
'[
J
SON
]
Response
-- Get's argument type
...
...
@@ -62,5 +64,6 @@ halAPI = Proxy
search
::
[
Text
]
->
[
Text
]
->
Maybe
SortField
->
Maybe
Int
->
ClientM
Response
search
=
client
halAPI
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