search.sites.Rd
Search PEcAn Sites from the database using search string based on
sitename. Hits the /api/sites/
API endpoint with
relevant query parameters
search.sites(server, sitename = "", ignore_case = TRUE)
Server object obtained using the connect() function
Search string for site name Default: "" (Returns all sites)
Indicator of case sensitive or case insensitive search
Response obtained from the /api/sites/
endpoint with relevant query parameters
server <- connect(url="http://pecan.localhost:80", username="carya", password="illinois")
# Get details of all sites
res1 <- search.sites(server)
#> Sorry! Server not responding.
# Get details of all sites containing 'willow' in their name
res2 <- search.sites(server, sitename="willow")
#> Sorry! Server not responding.
# Get details of sites where name contains "Willow" (case sensitive)
res3 <- search.sites(server, sitename="Willow", ignore_case=FALSE)
#> Sorry! Server not responding.