api function

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

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

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

Returns

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)
  • Maintainer: Seth Gransky
  • License: Apache License 2.0 | file LICENSE
  • Last published: 2020-06-17