call_that_api: Generic function to make API calls

Description Usage Arguments Details

View source: R/callthat_api.R

Description

Generic function to make API calls

Usage

1
2
3
4
5
6
7
8
call_that_api(
  api_connection,
  endpoint,
  request = NULL,
  headers = list(),
  action = c("GET", "POST", "PUT"),
  ...
)

Arguments

api_connection

A call_that_connection object.

endpoint

A character variable with containing the endpoint's name.

request

The body or query sent to the REST API.

headers

A list object containing a named list of headers to pass to the API.

action

The action to request from the API. Supported today are: GET, POST and PUT.

...

Other arguments to pass to the REST API call.

Details

It provides a single interface to perform the different calls to an API, such as GET or POST. This function is meant to be used by developers who which to extend callthat to integrate with other API server types.


edgararuiz/callthat documentation built on Dec. 20, 2021, 3:19 a.m.