call_slack_api: A wrapper function to call the Slack API with authentication...

View source: R/call_slack_api.R

call_slack_apiR Documentation

A wrapper function to call the Slack API with authentication and pagination.

Description

A wrapper function to call the Slack API with authentication and pagination.

Usage

call_slack_api(
  path,
  ...,
  body = NULL,
  .method = c("GET", "POST"),
  token,
  .verbose = Sys.getenv("SLACKR_VERBOSE", "FALSE"),
  .next_cursor = ""
)

Arguments

path

The API definition path, e.g. ⁠/api/auth.test⁠.

...

These arguments must be named and will be added to the API query string.

body

If .method = POST the body gets passed to the API body.

.method

Either "GET" or "POST".

token

Authentication token bearing required scopes.

.verbose

If TRUE, prints httr verbose messages. Useful for debugging.

.next_cursor

The value of the next cursor, when using pagination.

Value

The API response (a named list)


hrbrmstr/slackr documentation built on Nov. 10, 2023, 5:32 p.m.