download.input.Rd
Downloads & saves the desired input file.
Hits the /api/inputs/{input_id}
API endpoint
download.input(server, input_id, filename = NULL, save_as = NULL)
Server object obtained using the connect() function
ID of the PEcAn input to be downloaded
Optional filename specified if the id points to a folder instead of file
File name to save the downloaded file as. Default: NULL (same as 'filename' if specified, else defaults to 'pecan_input_file')
Response obtained from the /api/inputs/{input_id}
endpoint
server <- connect(url="http://pecan.localhost:80", username="carya", password="illinois")
# Download the 'niwot.clim' file (id = 99000000003)
download.input(server, input_id='99000000003', save_as='local.niwot.clim')
#> Sorry! Server not responding.