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
0
Issues
0
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
Przemyslaw Kaminski
hal
Commits
85e6936e
Commit
85e6936e
authored
Mar 07, 2019
by
Mael NICOLAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[WIP] Done implementing start
parent
eeadeabb
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 @
85e6936e
...
...
@@ -12,7 +12,7 @@ main :: IO ()
main
=
do
manager'
<-
newManager
tlsManagerSettings
res
<-
runClientM
(
search
[
"docid"
]
[
"docType_s:(THESE OR HDR)"
]
(
asc
"docid"
)
(
Just
1
))
(
search
[
"docid"
]
[
"docType_s:(THESE OR HDR)"
]
(
asc
"docid"
)
(
Just
1
)
(
Just
2
)
)
(
mkClientEnv
manager'
$
BaseUrl
Https
"api.archives-ouvertes.fr"
443
""
)
case
res
of
(
Left
err
)
->
print
err
...
...
src/HAL/Client.hs
View file @
85e6936e
...
...
@@ -23,6 +23,8 @@ type Search = "search"
:>
QueryParams
"fq"
Text
-- preatty much clear, (Asc || Desc) + field you want to sort by
:>
QueryParam
"sort"
SortField
-- permit to start a the x result
:>
QueryParam
"start"
Int
-- use rows to make the request only return the x number of result
:>
QueryParam
"rows"
Int
:>
Get
'[
J
SON
]
Response
...
...
@@ -65,5 +67,6 @@ search :: [Text]
->
[
Text
]
->
Maybe
SortField
->
Maybe
Int
->
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