Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Make it easier to apply existing `Content` functions to lists of content

Open
#465 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
r
Domain
api

Research direction

Read issue #463's change to search_content() and inspect the existing functions that operate on Content objects; no file or test is named here. Define how list inputs and additional arguments should behave, then verify that calls such as lock_content(old_content, locked_message = "R version is too old.") match the purrr::map() result.

Written by the indexing model from the issue text.

Description

#463 (in flight at time of writing) modifies search_content() to return a list of Connect class objects.

Right now, the best way to call existing functions that operate on Content class objects is to use purrr::map(). This is pretty simple if there are no additional arguments passed, but if additional args were required, you'd have to use R's anonymous function syntax.

# Assume `old_content` is a list of content class objects that need to be locked.

length(old_content)
# [1] 48

# Use purrr::map to apply existing functions to the list.
old_content <- purrr::map(old_content, lock_content)

# When passing extra args
old_content <- purrr::map(old_content, \(x) lock_content(x, locked_message = "R version is too old."))

It would be nicer if you could just pass the list to the functions and have it work, like so:

old_content <- lock_content(old_content, locked_message = "R version is too old.")

This might require us modifying all the content functions.

Dominant language
R
Stars
54
Forks
27
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from posit-dev/connectapi

All issues in posit-dev/connectapi

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.