API-methods | R Documentation |
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")
opts |
Antares simulation options or a |
endpoint |
API endpoint to interrogate, it will be added after |
... |
Additional arguments passed to API method. |
default_endpoint |
Default endpoint to use. |
parse_result |
|
encoding |
argument to pass as argument to the function |
Response from the API.
## Not run:
# 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")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.