Skip to contents

Removes all existing OAuth integrations associated with a content item, and creates associations with the integrations provided. You must have administrator or publisher privileges to perform this action.

Usage

set_integrations(content, integrations)

Arguments

content

A Content R6 object representing the content item to modify.

integrations

The complete set of integrations to be associated with the content. May be a single connect_integration object, a list of connect_integration objects, or NULL. Passing in an empty list or explicitly passing NULL will remove all associated integrations from the content.

Value

Invisibly returns NULL.

Examples

if (FALSE) { # \dontrun{
client <- connect()

content <- content_item(client, "12345678-90ab-cdef-1234-567890abcdef")

integrations <- get_integrations(client)

# Associate a single integration
github_integration <- purrr::keep(integrations, \(x) x$template == "github")[[1]]
set_integrations(content, github_integration)

# Associate multiple integrations at once
selected_integrations <- integrations[1:2]
set_integrations(content, selected_integrations)

# Unset integrations
set_integrations(content, NULL)
} # }