From 1ea8c6ed50d0710749677f86cf36458c43514fac Mon Sep 17 00:00:00 2001 From: ross hull Date: Wed, 31 Jul 2024 10:23:07 +0100 Subject: [PATCH] remove unnecisary dataset name checks get_latest_resource --- R/get_latest_resource.R | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/R/get_latest_resource.R b/R/get_latest_resource.R index 30cbfa7..8da4e9a 100644 --- a/R/get_latest_resource.R +++ b/R/get_latest_resource.R @@ -57,21 +57,8 @@ get_latest_resource <- function(dataset_name, "prescriptions-in-the-community", "community-pharmacy-contractor-activity" ) - # throw error if name type/format is invalid - check_dataset_name(dataset_name) - # define query and try API call - query <- list("id" = dataset_name) - content <- try( - phs_GET("package_show", query), - silent = TRUE - ) - # if content contains a 'Not Found Error' - # throw error with suggested dataset name - if (grepl("Not Found Error", content[1])) { - suggest_dataset_name(dataset_name) - } # check if data set is within applicable datasets # throw error if not