Nothing
#' @title Get current IDs in VecDyn
#' @description Get all the current dataset IDs in VecDyn, as a numeric vector.
#' @author Francis Windram
#'
#' @param basereq an [httr2 request][httr2::request()] object, as generated by [vb_basereq()]. If `NA`, uses the default request.
#' @return An `ohvbd.ids` vector of VecDyn dataset IDs.
#'
#' @examplesIf interactive()
#' find_vd_ids()
#'
#' @concept vecdyn
#'
#' @export
#'
find_vd_ids <- function(basereq = vb_basereq()) {
resplist <- tryCatch(
{
resp <- basereq |>
req_url_path_append("vecdynbyprovider") |>
req_url_query("format" = "json") |>
req_perform()
list("resp" = resp, "err_code" = 0, "err_obj" = NULL)
},
error = function(e) {
# Get the last response instead
list("resp" = last_response(), "err_code" = 1, "err_obj" = e)
}
)
if (resplist$err_code == 1) {
cli::cli_abort("No records found.")
}
body <- resplist$resp |> resp_body_json()
outids <- as.numeric(body$ids)
outids <- new_ohvbd.ids(v = outids, db = "vd")
return(outids)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.