Learn R Programming

rosetteApi (version 1.2.0)

api: api wrapper function that checks for a user_key and determines the Rosette API endpoint to be utilized

Description

api wrapper function that checks for a user_key and determines the Rosette API endpoint to be utilized

Usage

api(user_key, endpoint, parameters = FALSE, customHeaders = NULL, url = "https://api.rosette.com/rest/v1/")

Arguments

user_key
- Rosette API authentication key
endpoint
- Rosette API endpoint to be utilized
parameters
- parameters list to be passed to specified Rosette API endpoint
customHeaders
- custom headers for Rosette Api
url
- url for Rosette Api

Value

Returns json of the specified Rosette API endpoint response

Examples

Run this code
## Not run: 
# key <- "content"
# value <- "Bill Murray will appear in new Ghostbusters film."
# parameters <- list()
# parameters[[ key ]] <- value
# parameters <- toJSON(parameters)
# api(01234567890, "entities", parameters)
# ## End(Not run)

Run the code above in your browser using DataLab