download.input: Download & save the desired input file

View source: R/download.input.R

download.inputR Documentation

Download & save the desired input file

Description

Downloads & saves the desired input file. Hits the ⁠/api/inputs/{input_id}⁠ API endpoint

Usage

download.input(server, input_id, filename = NULL, save_as = NULL)

Arguments

server

Server object obtained using the connect() function

input_id

ID of the PEcAn input to be downloaded

filename

Optional filename specified if the id points to a folder instead of file

save_as

File name to save the downloaded file as. Default: NULL (same as 'filename' if specified, else defaults to 'pecan_input_file')

Value

Response obtained from the ⁠/api/inputs/{input_id}⁠ endpoint

Author(s)

Tezan Sahu

Examples

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')

PecanProject/rpecanapi documentation built on April 2, 2024, 8:17 a.m.