usgs-eros-client

Crates.iousgs-eros-client
lib.rsusgs-eros-client
version0.5.0
sourcesrc
created_at2020-10-19 20:39:18.703016
updated_at2020-10-19 20:39:18.703016
descriptionUSGS EROS M2M API client
homepage
repositoryhttps://gitlab.com/stcorp/public/usgs-eros-client/
max_upload_size
id303110
size215,327
S&T Rust (github:stcorp-no:s-t-rust)

documentation

README

Usgs EROS M2M API Client

An idiomatic Rust API for using the USGS EROS M2M data search and retrieval interface.

Usage

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

Commit count: 50

cargo fmt