Provide a convenience method for filtering lists from the server
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
Research direction
Start by reading search_content() and issue #463 to understand the returned Connect objects. Compare the example's purrr::keep() workflow with the proposed convenience method, and confirm the expected API and completion criteria before implementation; no file or test is named in the issue.
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 filter this list within R is to use purrr::keep(). Perhaps this is the best way, but perhaps there's a way we can make this easier.
my_content <- search_content(client, "owner:@me")
# > length(my_content)
# [1] 237
MINIMUM_R_VERSION <- "4.0"
# Use purrr::keep to filter with arbitrary predicates
old_content <- purrr::keep(my_content, function(x) {
isTRUE(as.numeric_version(x$content$r_version) < as.numeric_version(MINIMUM_R_VERSION))
})
length(old_content)
# [1] 48
- Dominant language
- R
- Stars
- 54
- Forks
- 27
- Avg merge
- 1d 3m
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from posit-dev/connectapi
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
posit-dev/connectapi#249 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
posit-dev/connectapi#527 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
posit-dev/connectapi#526 · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
posit-dev/connectapi#506 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
posit-dev/connectapi#486 ·
All issues in posit-dev/connectapi
Similar issues
-
documentation pkg infrastructure
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
epiverse-trace/epiparameter#511 ·
-
function:write_dwc
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Urgent request: Due to vulnerabilities move to API version 12.6.1 (12.6.2 eventually) or 13.1.1 Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
jbkunst/highcharter#849 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
r-lib/pkgdepends#485 · 3 comments ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100