| call_api {cometr} | R Documentation |
Call a Comet REST API endpoint
Description
This function is only meant for advanced users. If you would like to call any
arbitrary Comet API endpoint that isn't natively supported by cometr, you can
use this function.
Usage
call_api(
endpoint,
method = c("GET", "POST"),
params = list(),
parse_response = TRUE,
response_json = TRUE,
local_file_path = NULL,
api_key = NULL
)
Arguments
endpoint |
The REST API endpoint. |
method |
The HTTP method to use, either "GET" or "POST". |
params |
A list of parameters. For GET endpoints, the parameters are appended to the URL; for POST endpoints, the parameters are sent in the body of the request. |
parse_response |
If |
response_json |
If |
local_file_path |
The path to the local file for saving downloaded content if appropriate. |
api_key |
Comet API key (can also be specified using the |
Value
The parsed response