Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
DSCC
FSO Metadata Auto R
Commits
baf86817
Commit
baf86817
authored
Mar 01, 2022
by
Pauline Maury Laribière
Browse files
removing hash
parent
f98e0907
Pipeline
#323975
passed with stage
in 11 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
R/format_request.R
View file @
baf86817
...
...
@@ -28,21 +28,21 @@ csv_request <- function(url) {
}
# Request function based on expected response
REQUEST_FUNCTION_MAPPING
<-
hash
::
hash
(
REQUEST_FUNCTION_MAPPING
<-
list
(
"SDMX-ML"
=
sdmx_request
,
"JSON"
=
json_request
,
"CSV"
=
csv_request
)
#' Transform a
hash objec
t into a string of parameters
#'
hash::hash
("a" = list("1"), "b" = list("2", "3"))
#' Transform a
lis
t into a string of parameters
#'
list
("a" = list("1"), "b" = list("2", "3"))
#' becomes "a=1&b=2&b=3"
#'
#' @param filters hash object
#'
#' @return formatted string of parameters
hash
_to_string
<-
function
(
filters
)
{
list
_to_string
<-
function
(
filters
)
{
string
<-
""
for
(
prop
in
ls
(
filters
))
{
for
(
value
in
filters
[[
prop
]])
{
...
...
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