rest_get_method {eodhd} | R Documentation |
Generic REST GET method
Description
This function performs a generic REST GET request to the specified API endpoint. It takes an API key, endpoint, URI, and querystring as input and returns the response data in JSON format.
Usage
rest_get_method(api_key, endpoint = "", uri = "", querystring = list())
Arguments
api_key |
A character string representing the API key for authentication. |
endpoint |
A character string representing the API endpoint to request. |
uri |
A character string representing the URI for the request. |
querystring |
A list of key-value pairs representing the query parameters for the request. |
Value
The response data in JSON format.
Examples
api_key <- "demo"
endpoint <- "bond-fundamentals"
uri <- "DE000CB83CF0"
querystring <- list()
result <- rest_get_method(api_key, endpoint, uri, querystring)
print(result)
[Package eodhd version 1.0.4 Index]