Function stac_async::download::download

source ·
pub async fn download(
    href: impl ToString,
    directory: impl AsRef<Path>
) -> Result<Value>
Expand description

Downloads all assets from a Item or Collection.

The STAC object’s self href and asset hrefs are updated to point to the downloaded locations. The original object’s locations is included in a “canonical” link.

Examples

let value = stac_async::download("data/simple-item.json", "outdir").await.unwrap();