diff --git a/R/get_base_url-internal.R b/R/get_base_url-internal.R index 9a746ab..c6e697e 100644 --- a/R/get_base_url-internal.R +++ b/R/get_base_url-internal.R @@ -18,6 +18,9 @@ #' get_base_url <- function(location, area, type = "apa") { + ##Check if location is newyork if so set type to aap as newyork uses aap while craiglist uses apa elsewhere + type <-ifelse(location == 'newyork', 'aap', type) + ## Generate the base url if(area == "all"){ return(paste0("https://", location, ".craigslist.org/search/", type)) @@ -25,4 +28,4 @@ get_base_url <- function(location, area, type = "apa") return(paste0("https://", location, ".craigslist.org/search/", area, "/", type)) } -} \ No newline at end of file +}