api: api wrapper function that checks for a user_key and...

Description Usage Arguments Value Examples

View source: R/Api.R

Description

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

Usage

1
2
3
4
5
6
7
8
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

1
2
3
4
5
6
7
8
## 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)

rosetteApi documentation built on July 2, 2020, 2:12 a.m.