Skip to content
This repository has been archived by the owner on Feb 14, 2020. It is now read-only.

Fixes type error with newyork #21

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion R/get_base_url-internal.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@
#'
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))
} else {
return(paste0("https://", location, ".craigslist.org/search/", area, "/",
type))
}
}
}