Crates.io | usgs-eros-client |
lib.rs | usgs-eros-client |
version | 0.5.0 |
source | src |
created_at | 2020-10-19 20:39:18.703016 |
updated_at | 2020-10-19 20:39:18.703016 |
description | USGS EROS M2M API client |
homepage | |
repository | https://gitlab.com/stcorp/public/usgs-eros-client/ |
max_upload_size | |
id | 303110 |
size | 215,327 |
An idiomatic Rust API for using the USGS EROS M2M data search and retrieval interface.
Cargo.toml:
[dependencies]
usgs-eros-client = "^0.5"
tokio = {version = "^0.2", features = ["macros"]}
Basic functionality:
use usgs_eros_client::{Client, Result};
use usgs_eros_client::types::Credentials;
use usgs_eros_client::endpoints::DatasetRequestBuilder;
#[tokio::main]
async fn main() -> Result<()> {
let credentials = Credentials::from_env()?;
let client = Client::new(&credentials).await?;
let dataset = client.dataset()
.name("gls_all").call().await?;
println!("Dataset response: {:?}", dataset);
Ok(())
}
Made by: S&T Norway