Skip to content

get_content() discards tags when guid parameter is provided #411

@edavidaja

Description

@edavidaja

This is kind of surprising?

library(connectapi)
library(dplyr)
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union

client <- connect()
#> Defining Connect with server:

CONTENT_GUID <- "8cd033a0-7e0c-415d-8136-9da1a755c63c"

target_content <- content_item(client, CONTENT_GUID)
get_content_tags(target_content)
#> Posit Connect Tag Tree (content)
#> ├── FK_cat2
#> │   └── sub2
#> └── Action
#>    └── Fast and Furious

with_guid <- get_content(client, guid = CONTENT_GUID)
"tags" %in% names(with_guid)
#> [1] FALSE

no_guid <- get_content(client) |> filter(guid == CONTENT_GUID)
"tags" %in% names(no_guid)
#> [1] TRUE

Created on 2025-05-09 with reprex v2.1.1

Metadata

Metadata

Assignees

Labels

bugan unexpected problem or unintended behavior

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions