api {rosetteApi}R Documentation

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,
  custom_headers = NULL,
  url_parameters = 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

custom_headers

- custom headers for Rosette Api

url_parameters

- query parameters

url

- url for Rosette Api

Value

Returns a list(content, header)

Examples

## Not run: 
parameters <- list()
parameters[[ "content" ]] <- "Bill Murray will appear in new Ghostbusters
film."
response <- api(01234567890, "entities", parameters)
# The call above returns response$content and response$header

## End(Not run)

[Package rosetteApi version 1.14.4 Index]