Expand description

An async Rust library implementation to interact with the Smartsheet API v2.

Example

use smartsheet_rs::SmartsheetApi;

#[tokio::main]
async fn main() -> std::result::Result<(), Box<dyn std::error::Error + Send + Sync>> {
    let smart = SmartsheetApi::from_env()?;
    println!("Created a Smartsheet API client");

    let sheets = smart.list_sheets().await?;

    println!("Printing sheet IDs and names:");
    for sheet in sheets.data {
        println!(
            "{sep}{id:<20}|{sep}{name}",
            sep = '\t',
            id = sheet.id,
            name = sheet.name
        );
    }

    Ok(())
}

Implemented Methods

The following API methods from the official documentation have been implemented currently:

You can check out sample usage of these API methods in the examples/ folder in the project repo on GitHub.

Dependencies

This library uses only the minimum required dependencies, in order to keep the overall size small. This crate uses hyper and hyper-tls internally, to make HTTPS requests to the Smartsheet API.

Re-exports

pub use helpers::CellGetter;
pub use helpers::ColumnMapper;

Modules

Structs

Client implementation for making requests to the Smartsheet API v2