API methods
api_get(
opts,
endpoint,
...,
default_endpoint = "v1/studies",
parse_result = NULL,
encoding = NULL
)
api_post(opts, endpoint, ..., default_endpoint = "v1/studies")
api_put(opts, endpoint, ..., default_endpoint = "v1/studies")
api_delete(opts, endpoint, ..., default_endpoint = "v1/studies")
Antares simulation options or a list
with an host =
slot.
API endpoint to interrogate, it will be added after default_endpoint
.
Can be a full URL (by wrapping ìn I()
), in that case default_endpoint
is ignored.
Additional arguments passed to API method.
Default endpoint to use.
character
options for parameter as
of function httr::content()
argument to pass as argument to the function httr::content()
Response from the API.
if (FALSE) { # \dontrun{
# List studies with local API
# default result content in R object (auto parsed)
api_get(opts = list(host = "http://0.0.0.0:8080"),
endpoint = NULL,
parse_result = NULL)
# you can force parse options as text and encoding to UTF-8
api_get(opts = list(host = "http://0.0.0.0:8080"),
endpoint = NULL,
parse_result = "text",
encoding = "UTF-8")
} # }