Skip to content

Commit

Permalink
Style code (GHA)
Browse files Browse the repository at this point in the history
  • Loading branch information
ross-hull committed Jul 16, 2024
1 parent a22acf3 commit 4e2da8e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
16 changes: 8 additions & 8 deletions R/get_latest_resource.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ get_latest_resource <- function(dataset_name,
row_filters = NULL,
col_select = NULL,
include_context = FALSE) {


applicable_datasets <- c(
"gp-practice-populations", "gp-practice-contact-details-and-list-sizes",
"nhsscotland-payments-to-general-practice", "dental-practices-and-patient-registrations",
Expand All @@ -78,15 +76,17 @@ get_latest_resource <- function(dataset_name,
# check if data set is within applicable datasets
# throw error if not
if (!dataset_name %in% applicable_datasets) {
cli::cli_abort(c(
"The dataset name supplied {.var {dataset_name}} is not within the applicable datasets.
cli::cli_abort(
c(
"The dataset name supplied {.var {dataset_name}} is not within the applicable datasets.
These are:\n
{.var {applicable_datasets}}",
"x" = "Please see get_latest_reource documentation.",
"i" = "You can find dataset names in the URL
"x" = "Please see get_latest_reource documentation.",
"i" = "You can find dataset names in the URL
of a dataset's page on {.url www.opendata.nhs.scot}."
),
call = rlang::caller_env())
),
call = rlang::caller_env()
)
}


Expand Down
2 changes: 0 additions & 2 deletions R/get_latest_resource_id.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
#'
#' @return a string with the resource id
get_latest_resource_id <- function(dataset_name) {


# send the api request
query <- list("id" = dataset_name)
content <- phs_GET("package_show", query)
Expand Down

0 comments on commit 4e2da8e

Please sign in to comment.