Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
^\.github$
^\.envrc$
^\.vscode$
^\.claude$
^.*\.lic$
^renv$
^renv\.lock$
Expand All @@ -23,3 +24,5 @@
^.lintr$
^cran-comments\.md$
^CRAN-SUBMISSION$
^CLAUDE.local.md$
^CLAUDE.md$
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
shell: Rscript {0}

- name: Run integration tests
uses: nealrichardson/with-connect@dev
uses: nealrichardson/with-connect
env:
CONNECTAPI_INTEGRATED: "true"
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
needs: website

- name: Build site
uses: nealrichardson/with-connect@dev
uses: nealrichardson/with-connect
with:
# Runs on the default version in the with-connect action
license: ${{ secrets.CONNECT_LICENSE_FILE }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
needs: coverage

- name: Run coverage
uses: nealrichardson/with-connect@dev
uses: nealrichardson/with-connect
env:
CONNECTAPI_INTEGRATED: "true"
with:
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: connectapi
Title: Utilities for Interacting with the 'Posit Connect' Server API
Version: 0.8.0.9000
Version: 0.9.0
Authors@R: c(
person(given = "Toph",
family = "Allen",
Expand Down
3 changes: 1 addition & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# connectapi (development version)
# connectapi 0.9.0

- New `set_integrations()` function to set the OAuth integration
associations for a content item. (#414)
Expand All @@ -9,7 +9,6 @@
- New functions allow you to manage the OAuth integrations on your Connect
server: `create_integration()`, `update_integration()` and
`delete_integration()`. (#434)
- Support content search API with the `search_content()` function. (#272)
- New `search_content()` function which lets you search and filter content items
on the Connect server. (#272, #447)
- New `lock_content()` and `unlock_content()` functions for locking and unlocking
Expand Down
5 changes: 3 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,9 @@ to do the operation in question

**Warning about version numbers**

We test the package against a range of versions of Connect, as old as 1.8.8.2 (May 2021).
If your Connect server is older than that, the package may still work, but `connectapi` will warn you.
We test the package against a range of versions of Connect, as old as
`2022.10.0`. If your Connect server is older than that, the
package may still work.

We strive to:

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ Connect cluster to do the operation in question
**Warning about version numbers**

We test the package against a range of versions of Connect, as old as
`2022.10.0`. If your Connect server is older than that, the
package may still work.
`2022.10.0`. If your Connect server is older than that, the package may
still work.

We strive to:

Expand Down
74 changes: 37 additions & 37 deletions tests/testthat/test-content.R
Original file line number Diff line number Diff line change
Expand Up @@ -505,43 +505,6 @@ with_mock_dir("2025.09.0", {
)
})

test_that("content search uses default page_size of 500 and page_number of 1", {
without_internet(
expect_GET(
search_content(client, q = "bream"),
"https://connect.example/__api__/v1/search/content?q=bream&page_number=1&page_size=500&include=owner%2Cvanity_url" #nolint
)
)
})

test_that("content search passes arbitrary parameters through ... to query string", {
without_internet(
expect_GET(
search_content(
client,
q = "bream",
future_param = "value"
),
"https://connect.example/__api__/v1/search/content?q=bream&page_number=1&page_size=500&include=owner%2Cvanity_url&future_param=value" #nolint
)
)
})

test_that("the inner .search_content() func calls the endpoint correctly", {
without_internet(
expect_GET(
.search_content(
client,
q = "bream",
page_number = 2,
page_size = 20,
include = "owner"
),
"https://connect.example/__api__/v1/search/content?q=bream&page_number=2&page_size=20&include=owner"
)
)
})

test_that("search_content() can be converted to a data frame correctly", {
content_df <- search_content(client, q = "sea bream") |>
as_tibble()
Expand Down Expand Up @@ -595,6 +558,43 @@ with_mock_dir("2025.09.0", {
})
})

test_that("content search uses default page_size of 500 and page_number of 1", {
without_internet(
expect_GET(
search_content(client, q = "bream"),
"https://connect.example/__api__/v1/search/content?q=bream&page_number=1&page_size=500&include=owner%2Cvanity_url" #nolint
)
)
})

test_that("content search passes arbitrary parameters through ... to query string", {
without_internet(
expect_GET(
search_content(
client,
q = "bream",
future_param = "value"
),
"https://connect.example/__api__/v1/search/content?q=bream&page_number=1&page_size=500&include=owner%2Cvanity_url&future_param=value" #nolint
)
)
})

test_that("the inner .search_content() func calls the endpoint correctly", {
without_internet(
expect_GET(
.search_content(
client,
q = "bream",
page_number = 2,
page_size = 20,
include = "owner"
),
"https://connect.example/__api__/v1/search/content?q=bream&page_number=2&page_size=20&include=owner"
)
)
})

test_that("content search errors on Connect < 2024.04.0", {
client <- MockConnect$new("2024.04.0")
client$mock_response(
Expand Down