cf_query: Execute a Crowdflower API call

Description Usage Arguments Value

Description

Connects to the CrowdFlower API and executes an API request, returning the content of the HTTP response.

Usage

1
2
3
cf_query(endpoint, query = NULL, body = NULL, type = "GET",
  parse = TRUE, key = Sys.getenv("CROWDFLOWER_API_KEY"),
  base_url = "https://api.crowdflower.com/v1/", ...)

Arguments

endpoint

A character string specifying the endpoint of API request relative to base_url

query

A list containing named URL query parameters to add to request URL.

body

Additional parameters to add to request body.

type

A character string specifying the type of HTTP request (“GET”, “POST”, “PUT”, etc.).

parse

A logical indicating whether to parse the response (TRUE, the default) or return a raw vector (FALSE).

key

A character string containing a Crowdflower API key.

base_url

A character string specifying the base URL of API request.

...

Additional arguments passed to an HTTP request function (e.g, GET, POST, PUT).

Value

A character string containing the content of the HTTP request.


cloudyr/crowdflower documentation built on May 13, 2019, 8:20 p.m.