diff --git a/NAMESPACE b/NAMESPACE
index 8a647e87..2c799d1e 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -54,7 +54,6 @@ export(create_random_name)
export(create_tag)
export(create_tag_tree)
export(dashboard_url)
-export(dashboard_url_chr)
export(delete_bundle)
export(delete_image)
export(delete_runtime_cache)
diff --git a/R/connect.R b/R/connect.R
index 4614043d..87e89ca7 100644
--- a/R/connect.R
+++ b/R/connect.R
@@ -383,61 +383,6 @@ Connect <- R6::R6Class(
invisible(self$DELETE(v1_url("tags", id)))
},
- # content listing ----------------------------------------------------------
-
- # filter is a named list, e.g. list(name = 'appname')
- # this function supports pages
- #' @description Get content items.
- #' @param filter Named list containing filter conditions.
- #' @param .collapse How multiple filters are combined.
- #' @param .limit The limit.
- #' @param page_size The page size.
- get_apps = function(
- filter = NULL,
- .collapse = "&",
- .limit = Inf,
- page_size = 25
- ) {
- path <- unversioned_url("applications")
- query <- list(
- count = min(page_size, .limit)
- )
- if (!is.null(filter)) {
- query$filter <- paste(
- sapply(seq_along(filter), function(i) {
- sprintf("%s:%s", names(filter)[i], filter[[i]])
- }),
- collapse = .collapse
- )
- }
-
- prg <- optional_progress_bar(
- format = "downloading page :current (:tick_rate/sec) :elapsedfull",
- total = NA,
- clear = FALSE
- )
-
- # handle paging
- prg$tick()
- res <- self$GET(path, query = query)
-
- all <- res$applications
- all_l <- length(all)
- query$start <- 1
- while (length(res$applications) > 0 && all_l < .limit) {
- prg$tick()
-
- query$start <- query$start + page_size
- query$page_size <- min(page_size, .limit - all_l)
- query$cont <- res$continuation
- res <- self$GET(path, query = query)
-
- all <- c(all, res$applications)
- all_l <- length(all)
- }
- all
- },
-
#' @description Get a schedule.
#' @param schedule_id The schedule identifier.
get_schedule = function(schedule_id) {
diff --git a/R/content.R b/R/content.R
index 3126cb1e..c2dca338 100644
--- a/R/content.R
+++ b/R/content.R
@@ -101,7 +101,11 @@ Content <- R6::R6Class(
#' @description Return the URL for this content in the Posit Connect dashboard.
#' @param pane The pane in the dashboard to link to.
get_dashboard_url = function(pane = "") {
- dashboard_url_chr(self$connect$server, self$content$guid, pane = pane)
+ url <- self$content$dashboard_url
+ if (nzchar(pane)) {
+ url <- paste0(url, "/", pane)
+ }
+ url
},
#' @description Return the jobs for this content
jobs = function() {
@@ -370,7 +374,7 @@ Content <- R6::R6Class(
cat(" Content GUID: ", self$get_content()$guid, "\n", sep = "")
cat(
" Content URL: ",
- dashboard_url_chr(self$get_connect()$server, self$get_content()$guid),
+ self$get_content()$dashboard_url,
"\n",
sep = ""
)
@@ -662,7 +666,7 @@ content_ensure <- function(
}
} else {
# name-based deployment
- content <- connect$get_apps(list(name = name))
+ content <- connect$content(name = name, include = NULL)
if (length(content) > 1) {
stop(glue::glue(
"Found {length(content)} content items ",
@@ -689,7 +693,7 @@ content_ensure <- function(
content <- content[[1]]
if (!"existing" %in% .permitted) {
stop(glue::glue(
- "Content with name {name} already exists at {dashboard_url_chr(connect$server, content$guid)}"
+ "Content with name {name} already exists at {content$dashboard_url}"
))
}
message(glue::glue(
diff --git a/R/deploy.R b/R/deploy.R
index 20385686..99ab46f2 100644
--- a/R/deploy.R
+++ b/R/deploy.R
@@ -149,7 +149,7 @@ ContentTask <- R6::R6Class(
cat(" Content GUID: ", self$get_content()$guid, "\n", sep = "")
cat(
" URL: ",
- dashboard_url_chr(self$get_connect()$server, self$get_content()$guid),
+ self$get_content()$dashboard_url,
"\n",
sep = ""
)
@@ -715,33 +715,3 @@ poll_task <- function(task, wait = 1, callback = message) {
dashboard_url <- function(content, pane = "") {
content$get_dashboard_url(pane = pane)
}
-
-#' Build a Dashboard URL from Character Vectors
-#'
-#' Returns the URL for the content dashboard (opened to the selected pane).
-#' NOTE: this takes a character object for performance optimization.
-#'
-#' @param connect_url character The base URL of the Connect server
-#' @param content_guid character The guid for the content item in question
-#' @param pane character The pane in the dashboard to link to
-#'
-#' @return character The dashboard URL for the content provided
-#'
-#' @family content functions
-#' @export
-dashboard_url_chr <- function(connect_url, content_guid, pane = "") {
- purrr::pmap_chr(
- list(x = connect_url, y = content_guid, z = pane),
- function(x, y, z) {
- paste(
- x,
- "connect",
- "#",
- "apps",
- y,
- z,
- sep = "/"
- )
- }
- )
-}
diff --git a/R/promote.R b/R/promote.R
index 3d6ade1c..0ff7417f 100644
--- a/R/promote.R
+++ b/R/promote.R
@@ -29,8 +29,8 @@ promote <- function(from, to, to_key, from_key, name) {
from_client <- connect(server = from, api_key = from_key)
to_client <- connect(server = to, api_key = to_key)
- # find app on "from" server
- from_app <- from_client$get_apps(list(name = name))
+ # find content on "from" server
+ from_app <- from_client$content(name = name, include = NULL)
if (length(from_app) != 1) {
stop(sprintf(
"Found %d apps matching app name %s on %s. Content must have a unique name.",
@@ -39,7 +39,7 @@ promote <- function(from, to, to_key, from_key, name) {
from
))
}
- from_app <- content_item(from_client, guid = from_app[[1]]$guid)
+ from_app <- Content$new(connect = from_client, content = from_app[[1]])
# download bundle
bundle <- download_bundle(from_app)
diff --git a/R/utils.R b/R/utils.R
index 4bebd5ef..19dc1747 100644
--- a/R/utils.R
+++ b/R/utils.R
@@ -25,6 +25,7 @@ generate_R6_print_output <- # nolint: object_name_linter
ex_content <- list(
guid = "content-guid",
title = "content-title",
+ dashboard_url = "http://test_host/connect/#/apps/content-guid/",
url = "http://content-url"
)
cnt1 <- Content$new(connect = con, ex_content)
diff --git a/_pkgdown.yml b/_pkgdown.yml
index 10657a04..00aa5680 100644
--- a/_pkgdown.yml
+++ b/_pkgdown.yml
@@ -81,7 +81,6 @@ reference:
- browse_solo
- create_random_name
- dashboard_url
- - dashboard_url_chr
- delete_runtime_cache
diff --git a/man/PositConnect.Rd b/man/PositConnect.Rd
index f1c1f349..ce5b1476 100644
--- a/man/PositConnect.Rd
+++ b/man/PositConnect.Rd
@@ -92,7 +92,6 @@ Other R6 classes:
\item \href{#method-Connect-tag_create}{\code{Connect$tag_create()}}
\item \href{#method-Connect-tag}{\code{Connect$tag()}}
\item \href{#method-Connect-tag_delete}{\code{Connect$tag_delete()}}
-\item \href{#method-Connect-get_apps}{\code{Connect$get_apps()}}
\item \href{#method-Connect-get_schedule}{\code{Connect$get_schedule()}}
\item \href{#method-Connect-content_create}{\code{Connect$content_create()}}
\item \href{#method-Connect-content_upload}{\code{Connect$content_upload()}}
@@ -605,29 +604,6 @@ Delete a tag.
}
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Connect-get_apps}{}}}
-\subsection{Method \code{get_apps()}}{
-Get content items.
-\subsection{Usage}{
-\if{html}{\out{}}\preformatted{Connect$get_apps(filter = NULL, .collapse = "&", .limit = Inf, page_size = 25)}\if{html}{\out{
}}
-}
-
-\subsection{Arguments}{
-\if{html}{\out{}}
-\describe{
-\item{\code{filter}}{Named list containing filter conditions.}
-
-\item{\code{.collapse}}{How multiple filters are combined.}
-
-\item{\code{.limit}}{The limit.}
-
-\item{\code{page_size}}{The page size.}
-}
-\if{html}{\out{
}}
-}
-}
-\if{html}{\out{
}}
\if{html}{\out{}}
\if{latex}{\out{\hypertarget{method-Connect-get_schedule}{}}}
\subsection{Method \code{get_schedule()}}{
diff --git a/man/content_delete.Rd b/man/content_delete.Rd
index 182d7226..58a21cf4 100644
--- a/man/content_delete.Rd
+++ b/man/content_delete.Rd
@@ -25,7 +25,6 @@ Other content functions:
\code{\link{content_update}()},
\code{\link{create_random_name}()},
\code{\link{dashboard_url}()},
-\code{\link{dashboard_url_chr}()},
\code{\link{delete_thumbnail}()},
\code{\link{delete_vanity_url}()},
\code{\link{deploy_repo}()},
diff --git a/man/content_item.Rd b/man/content_item.Rd
index ae0dda8b..aabc8aac 100644
--- a/man/content_item.Rd
+++ b/man/content_item.Rd
@@ -31,7 +31,6 @@ Other content functions:
\code{\link{content_update}()},
\code{\link{create_random_name}()},
\code{\link{dashboard_url}()},
-\code{\link{dashboard_url_chr}()},
\code{\link{delete_thumbnail}()},
\code{\link{delete_vanity_url}()},
\code{\link{deploy_repo}()},
diff --git a/man/content_title.Rd b/man/content_title.Rd
index 983c829e..9d74b6b1 100644
--- a/man/content_title.Rd
+++ b/man/content_title.Rd
@@ -27,7 +27,6 @@ Other content functions:
\code{\link{content_update}()},
\code{\link{create_random_name}()},
\code{\link{dashboard_url}()},
-\code{\link{dashboard_url_chr}()},
\code{\link{delete_thumbnail}()},
\code{\link{delete_vanity_url}()},
\code{\link{deploy_repo}()},
diff --git a/man/content_update.Rd b/man/content_update.Rd
index dfbad0b4..29cef5e3 100644
--- a/man/content_update.Rd
+++ b/man/content_update.Rd
@@ -47,7 +47,6 @@ Other content functions:
\code{\link{content_title}()},
\code{\link{create_random_name}()},
\code{\link{dashboard_url}()},
-\code{\link{dashboard_url_chr}()},
\code{\link{delete_thumbnail}()},
\code{\link{delete_vanity_url}()},
\code{\link{deploy_repo}()},
diff --git a/man/create_random_name.Rd b/man/create_random_name.Rd
index b2c1a73b..e4103ed8 100644
--- a/man/create_random_name.Rd
+++ b/man/create_random_name.Rd
@@ -24,7 +24,6 @@ Other content functions:
\code{\link{content_title}()},
\code{\link{content_update}()},
\code{\link{dashboard_url}()},
-\code{\link{dashboard_url_chr}()},
\code{\link{delete_thumbnail}()},
\code{\link{delete_vanity_url}()},
\code{\link{deploy_repo}()},
diff --git a/man/dashboard_url.Rd b/man/dashboard_url.Rd
index dd768143..b86e53a2 100644
--- a/man/dashboard_url.Rd
+++ b/man/dashboard_url.Rd
@@ -24,7 +24,6 @@ Other content functions:
\code{\link{content_title}()},
\code{\link{content_update}()},
\code{\link{create_random_name}()},
-\code{\link{dashboard_url_chr}()},
\code{\link{delete_thumbnail}()},
\code{\link{delete_vanity_url}()},
\code{\link{deploy_repo}()},
diff --git a/man/dashboard_url_chr.Rd b/man/dashboard_url_chr.Rd
deleted file mode 100644
index 11b19037..00000000
--- a/man/dashboard_url_chr.Rd
+++ /dev/null
@@ -1,54 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/deploy.R
-\name{dashboard_url_chr}
-\alias{dashboard_url_chr}
-\title{Build a Dashboard URL from Character Vectors}
-\usage{
-dashboard_url_chr(connect_url, content_guid, pane = "")
-}
-\arguments{
-\item{connect_url}{character The base URL of the Connect server}
-
-\item{content_guid}{character The guid for the content item in question}
-
-\item{pane}{character The pane in the dashboard to link to}
-}
-\value{
-character The dashboard URL for the content provided
-}
-\description{
-Returns the URL for the content dashboard (opened to the selected pane).
-NOTE: this takes a character object for performance optimization.
-}
-\seealso{
-Other content functions:
-\code{\link{content_delete}()},
-\code{\link{content_item}()},
-\code{\link{content_title}()},
-\code{\link{content_update}()},
-\code{\link{create_random_name}()},
-\code{\link{dashboard_url}()},
-\code{\link{delete_thumbnail}()},
-\code{\link{delete_vanity_url}()},
-\code{\link{deploy_repo}()},
-\code{\link{get_bundles}()},
-\code{\link{get_environment}()},
-\code{\link{get_image}()},
-\code{\link{get_job}()},
-\code{\link{get_jobs}()},
-\code{\link{get_log}()},
-\code{\link{get_thumbnail}()},
-\code{\link{get_vanity_url}()},
-\code{\link{git}},
-\code{\link{has_thumbnail}()},
-\code{\link{permissions}},
-\code{\link{set_image_path}()},
-\code{\link{set_run_as}()},
-\code{\link{set_thumbnail}()},
-\code{\link{set_vanity_url}()},
-\code{\link{swap_vanity_url}()},
-\code{\link{swap_vanity_urls}()},
-\code{\link{terminate_jobs}()},
-\code{\link{verify_content_name}()}
-}
-\concept{content functions}
diff --git a/man/delete_thumbnail.Rd b/man/delete_thumbnail.Rd
index db635a20..87a30706 100644
--- a/man/delete_thumbnail.Rd
+++ b/man/delete_thumbnail.Rd
@@ -36,7 +36,6 @@ Other content functions:
\code{\link{content_update}()},
\code{\link{create_random_name}()},
\code{\link{dashboard_url}()},
-\code{\link{dashboard_url_chr}()},
\code{\link{delete_vanity_url}()},
\code{\link{deploy_repo}()},
\code{\link{get_bundles}()},
diff --git a/man/delete_vanity_url.Rd b/man/delete_vanity_url.Rd
index ac440c14..c30dbcbc 100644
--- a/man/delete_vanity_url.Rd
+++ b/man/delete_vanity_url.Rd
@@ -20,7 +20,6 @@ Other content functions:
\code{\link{content_update}()},
\code{\link{create_random_name}()},
\code{\link{dashboard_url}()},
-\code{\link{dashboard_url_chr}()},
\code{\link{delete_thumbnail}()},
\code{\link{deploy_repo}()},
\code{\link{get_bundles}()},
diff --git a/man/deploy_repo.Rd b/man/deploy_repo.Rd
index 018fe807..5cc312c0 100644
--- a/man/deploy_repo.Rd
+++ b/man/deploy_repo.Rd
@@ -63,7 +63,6 @@ Other content functions:
\code{\link{content_update}()},
\code{\link{create_random_name}()},
\code{\link{dashboard_url}()},
-\code{\link{dashboard_url_chr}()},
\code{\link{delete_thumbnail}()},
\code{\link{delete_vanity_url}()},
\code{\link{get_bundles}()},
diff --git a/man/environment.Rd b/man/environment.Rd
index c183d5e5..704906f2 100644
--- a/man/environment.Rd
+++ b/man/environment.Rd
@@ -45,7 +45,6 @@ Other content functions:
\code{\link{content_update}()},
\code{\link{create_random_name}()},
\code{\link{dashboard_url}()},
-\code{\link{dashboard_url_chr}()},
\code{\link{delete_thumbnail}()},
\code{\link{delete_vanity_url}()},
\code{\link{deploy_repo}()},
diff --git a/man/get_bundles.Rd b/man/get_bundles.Rd
index 47cbb2cf..16146f87 100644
--- a/man/get_bundles.Rd
+++ b/man/get_bundles.Rd
@@ -25,7 +25,6 @@ Other content functions:
\code{\link{content_update}()},
\code{\link{create_random_name}()},
\code{\link{dashboard_url}()},
-\code{\link{dashboard_url_chr}()},
\code{\link{delete_thumbnail}()},
\code{\link{delete_vanity_url}()},
\code{\link{deploy_repo}()},
@@ -55,7 +54,6 @@ Other content functions:
\code{\link{content_update}()},
\code{\link{create_random_name}()},
\code{\link{dashboard_url}()},
-\code{\link{dashboard_url_chr}()},
\code{\link{delete_thumbnail}()},
\code{\link{delete_vanity_url}()},
\code{\link{deploy_repo}()},
diff --git a/man/get_image.Rd b/man/get_image.Rd
index b05e6b42..2bced5af 100644
--- a/man/get_image.Rd
+++ b/man/get_image.Rd
@@ -35,7 +35,6 @@ Other content functions:
\code{\link{content_update}()},
\code{\link{create_random_name}()},
\code{\link{dashboard_url}()},
-\code{\link{dashboard_url_chr}()},
\code{\link{delete_thumbnail}()},
\code{\link{delete_vanity_url}()},
\code{\link{deploy_repo}()},
diff --git a/man/get_job.Rd b/man/get_job.Rd
index ad8b7d0a..48588c3e 100644
--- a/man/get_job.Rd
+++ b/man/get_job.Rd
@@ -29,7 +29,6 @@ Other content functions:
\code{\link{content_update}()},
\code{\link{create_random_name}()},
\code{\link{dashboard_url}()},
-\code{\link{dashboard_url_chr}()},
\code{\link{delete_thumbnail}()},
\code{\link{delete_vanity_url}()},
\code{\link{deploy_repo}()},
diff --git a/man/get_jobs.Rd b/man/get_jobs.Rd
index bdf53b97..ba9a2959 100644
--- a/man/get_jobs.Rd
+++ b/man/get_jobs.Rd
@@ -104,7 +104,6 @@ Other content functions:
\code{\link{content_update}()},
\code{\link{create_random_name}()},
\code{\link{dashboard_url}()},
-\code{\link{dashboard_url_chr}()},
\code{\link{delete_thumbnail}()},
\code{\link{delete_vanity_url}()},
\code{\link{deploy_repo}()},
diff --git a/man/get_log.Rd b/man/get_log.Rd
index 84320076..28a1f272 100644
--- a/man/get_log.Rd
+++ b/man/get_log.Rd
@@ -51,7 +51,6 @@ Other content functions:
\code{\link{content_update}()},
\code{\link{create_random_name}()},
\code{\link{dashboard_url}()},
-\code{\link{dashboard_url_chr}()},
\code{\link{delete_thumbnail}()},
\code{\link{delete_vanity_url}()},
\code{\link{deploy_repo}()},
diff --git a/man/get_thumbnail.Rd b/man/get_thumbnail.Rd
index ad895092..bc4c1d42 100644
--- a/man/get_thumbnail.Rd
+++ b/man/get_thumbnail.Rd
@@ -41,7 +41,6 @@ Other content functions:
\code{\link{content_update}()},
\code{\link{create_random_name}()},
\code{\link{dashboard_url}()},
-\code{\link{dashboard_url_chr}()},
\code{\link{delete_thumbnail}()},
\code{\link{delete_vanity_url}()},
\code{\link{deploy_repo}()},
diff --git a/man/get_vanity_url.Rd b/man/get_vanity_url.Rd
index 7ffd1cee..fe582453 100644
--- a/man/get_vanity_url.Rd
+++ b/man/get_vanity_url.Rd
@@ -23,7 +23,6 @@ Other content functions:
\code{\link{content_update}()},
\code{\link{create_random_name}()},
\code{\link{dashboard_url}()},
-\code{\link{dashboard_url_chr}()},
\code{\link{delete_thumbnail}()},
\code{\link{delete_vanity_url}()},
\code{\link{deploy_repo}()},
diff --git a/man/git.Rd b/man/git.Rd
index c99786e5..6d379c29 100644
--- a/man/git.Rd
+++ b/man/git.Rd
@@ -48,7 +48,6 @@ Other content functions:
\code{\link{content_update}()},
\code{\link{create_random_name}()},
\code{\link{dashboard_url}()},
-\code{\link{dashboard_url_chr}()},
\code{\link{delete_thumbnail}()},
\code{\link{delete_vanity_url}()},
\code{\link{deploy_repo}()},
diff --git a/man/has_thumbnail.Rd b/man/has_thumbnail.Rd
index 129d7d77..fa1e78fa 100644
--- a/man/has_thumbnail.Rd
+++ b/man/has_thumbnail.Rd
@@ -37,7 +37,6 @@ Other content functions:
\code{\link{content_update}()},
\code{\link{create_random_name}()},
\code{\link{dashboard_url}()},
-\code{\link{dashboard_url_chr}()},
\code{\link{delete_thumbnail}()},
\code{\link{delete_vanity_url}()},
\code{\link{deploy_repo}()},
diff --git a/man/permissions.Rd b/man/permissions.Rd
index fbbee864..8eb3e05d 100644
--- a/man/permissions.Rd
+++ b/man/permissions.Rd
@@ -70,7 +70,6 @@ Other content functions:
\code{\link{content_update}()},
\code{\link{create_random_name}()},
\code{\link{dashboard_url}()},
-\code{\link{dashboard_url_chr}()},
\code{\link{delete_thumbnail}()},
\code{\link{delete_vanity_url}()},
\code{\link{deploy_repo}()},
diff --git a/man/set_image.Rd b/man/set_image.Rd
index 4d9b6709..a35e284b 100644
--- a/man/set_image.Rd
+++ b/man/set_image.Rd
@@ -41,7 +41,6 @@ Other content functions:
\code{\link{content_update}()},
\code{\link{create_random_name}()},
\code{\link{dashboard_url}()},
-\code{\link{dashboard_url_chr}()},
\code{\link{delete_thumbnail}()},
\code{\link{delete_vanity_url}()},
\code{\link{deploy_repo}()},
diff --git a/man/set_run_as.Rd b/man/set_run_as.Rd
index 40905d18..43593146 100644
--- a/man/set_run_as.Rd
+++ b/man/set_run_as.Rd
@@ -43,7 +43,6 @@ Other content functions:
\code{\link{content_update}()},
\code{\link{create_random_name}()},
\code{\link{dashboard_url}()},
-\code{\link{dashboard_url_chr}()},
\code{\link{delete_thumbnail}()},
\code{\link{delete_vanity_url}()},
\code{\link{deploy_repo}()},
diff --git a/man/set_thumbnail.Rd b/man/set_thumbnail.Rd
index 57b441fa..63e2360e 100644
--- a/man/set_thumbnail.Rd
+++ b/man/set_thumbnail.Rd
@@ -40,7 +40,6 @@ Other content functions:
\code{\link{content_update}()},
\code{\link{create_random_name}()},
\code{\link{dashboard_url}()},
-\code{\link{dashboard_url_chr}()},
\code{\link{delete_thumbnail}()},
\code{\link{delete_vanity_url}()},
\code{\link{deploy_repo}()},
diff --git a/man/set_vanity_url.Rd b/man/set_vanity_url.Rd
index e65a4265..7bd9c776 100644
--- a/man/set_vanity_url.Rd
+++ b/man/set_vanity_url.Rd
@@ -36,7 +36,6 @@ Other content functions:
\code{\link{content_update}()},
\code{\link{create_random_name}()},
\code{\link{dashboard_url}()},
-\code{\link{dashboard_url_chr}()},
\code{\link{delete_thumbnail}()},
\code{\link{delete_vanity_url}()},
\code{\link{deploy_repo}()},
diff --git a/man/swap_vanity_url.Rd b/man/swap_vanity_url.Rd
index 1d09db6b..c9854ef0 100644
--- a/man/swap_vanity_url.Rd
+++ b/man/swap_vanity_url.Rd
@@ -26,7 +26,6 @@ Other content functions:
\code{\link{content_update}()},
\code{\link{create_random_name}()},
\code{\link{dashboard_url}()},
-\code{\link{dashboard_url_chr}()},
\code{\link{delete_thumbnail}()},
\code{\link{delete_vanity_url}()},
\code{\link{deploy_repo}()},
diff --git a/man/swap_vanity_urls.Rd b/man/swap_vanity_urls.Rd
index 93b78052..c95957b0 100644
--- a/man/swap_vanity_urls.Rd
+++ b/man/swap_vanity_urls.Rd
@@ -25,7 +25,6 @@ Other content functions:
\code{\link{content_update}()},
\code{\link{create_random_name}()},
\code{\link{dashboard_url}()},
-\code{\link{dashboard_url_chr}()},
\code{\link{delete_thumbnail}()},
\code{\link{delete_vanity_url}()},
\code{\link{deploy_repo}()},
diff --git a/man/terminate_jobs.Rd b/man/terminate_jobs.Rd
index 6355a96f..b3245828 100644
--- a/man/terminate_jobs.Rd
+++ b/man/terminate_jobs.Rd
@@ -53,7 +53,6 @@ Other content functions:
\code{\link{content_update}()},
\code{\link{create_random_name}()},
\code{\link{dashboard_url}()},
-\code{\link{dashboard_url_chr}()},
\code{\link{delete_thumbnail}()},
\code{\link{delete_vanity_url}()},
\code{\link{deploy_repo}()},
diff --git a/man/verify_content_name.Rd b/man/verify_content_name.Rd
index b9c590e0..f26d3b5d 100644
--- a/man/verify_content_name.Rd
+++ b/man/verify_content_name.Rd
@@ -28,7 +28,6 @@ Other content functions:
\code{\link{content_update}()},
\code{\link{create_random_name}()},
\code{\link{dashboard_url}()},
-\code{\link{dashboard_url_chr}()},
\code{\link{delete_thumbnail}()},
\code{\link{delete_vanity_url}()},
\code{\link{deploy_repo}()},
diff --git a/tests/integrated/test-tags.R b/tests/integrated/test-tags.R
index 5c8e44c1..1a72e067 100644
--- a/tests/integrated/test-tags.R
+++ b/tests/integrated/test-tags.R
@@ -36,29 +36,6 @@ test_that("create tags works", {
expect_equal(child_tag$id, test_conn_1$get_tag_id(child_tag_name))
})
-test_that("associate tag with content", {
- tag_content <<- deploy(
- test_conn_1,
- bundle_path(
- rprojroot::find_package_root_file(
- "tests/testthat/examples",
- "static.tar.gz"
- )
- ),
- name = content_name
- )
-
- # set tag
- test_conn_1$set_content_tag(tag_content$get_content()$guid, child_tag$id)
-
- # ensure content is found
- res <- test_conn_1$get_apps(filter = list(tag = child_tag$id))
-
- expect_true(
- tag_content$get_content()$guid %in% purrr::map_chr(res, ~ .x$guid)
- )
-})
-
## Test high level functions --------------------------------------------------
test_that("get_tags works", {
@@ -266,37 +243,3 @@ test_that("set_content_tag_tree works", {
app1$tag_delete(get_content_tags(app1)[[ptag_1]][["id"]])
expect_length(get_content_tags(app1), 0)
})
-
-test_that("identical tag names are searched properly", {
- tag_content_guid <- tag_content$get_content()$guid
-
- # create another tag with same name
- child_tag_2 <- test_conn_1$tag_create(
- name = child_tag_name,
- parent_id = child_tag$id
- )
-
- # search with the "empty" tag in front
- res <- test_conn_1$get_apps(
- filter = list(tag = child_tag_2$id, tag = child_tag$id),
- .collapse = "||"
- )
-
- expect_true(
- tag_content_guid %in% purrr::map_chr(res, ~ .x$guid)
- )
-
- # check that duplicates do not happen
- test_conn_1$set_content_tag(
- tag_content_guid,
- child_tag_2$id
- )
-
- res2 <- test_conn_1$get_apps(
- filter = list(tag = child_tag_2$id, tag = child_tag$id),
- .collapse = "||"
- )
-
- guids <- purrr::map_chr(res2, ~ .x$guid)
- expect_true(length(guids[guids == tag_content_guid]) == 1)
-})
diff --git a/tests/testthat/_snaps/content.md b/tests/testthat/_snaps/content.md
index 5d191eb0..b0dc112a 100644
--- a/tests/testthat/_snaps/content.md
+++ b/tests/testthat/_snaps/content.md
@@ -5,7 +5,7 @@
Output
Posit Connect Content:
Content GUID: f2f37341-e21d-3d80-c698-a935ad614066
- Content URL: https://connect.example/connect/#/apps/f2f37341-e21d-3d80-c698-a935ad614066/
+ Content URL: https://connect.example/connect/#/apps/f2f37341-e21d-3d80-c698-a935ad614066
Content Title: Performance Data
content_item(client, guid = "f2f37341-e21d-3d80-c698-a935ad614066")
diff --git a/tests/testthat/test-deploy.R b/tests/testthat/test-deploy.R
index 95c5a8db..922b8b32 100644
--- a/tests/testthat/test-deploy.R
+++ b/tests/testthat/test-deploy.R
@@ -1,32 +1,3 @@
-test_that("dashboard_url_chr works with various length inputs", {
- expect_identical(dashboard_url_chr("a", "b", "c"), "a/connect/#/apps/b/c")
- expect_identical(
- dashboard_url_chr("a", c("b", "c"), "d"),
- c("a/connect/#/apps/b/d", "a/connect/#/apps/c/d")
- )
- expect_identical(
- dashboard_url_chr(
- c("a", "b"),
- c("c", "d"),
- c("e", "f")
- ),
- c("a/connect/#/apps/c/e", "b/connect/#/apps/d/f")
- )
-})
-
-test_that("dashboard_url_chr fails with invalid inputs", {
- class <- if (packageVersion("purrr") >= "0.9000") {
- "vctrs_error_incompatible_size"
- } else {
- "purrr_error_bad_element_length"
- }
-
- expect_error(
- dashboard_url_chr(c("a", "b", "c"), "d", c("e", "f")),
- class = class
- )
-})
-
test_that("bundle_dir errors if no manifest.json", {
expect_error(
suppressMessages(bundle_dir(rprojroot::find_testthat_root_file(