amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
use amazon_spapi::{client::{SpapiClient, SpapiConfig}, marketplace_ids};
use anyhow::Result;

#[tokio::main]
async fn main() -> Result<()> {
    let client = SpapiClient::new(SpapiConfig::from_env()?)?;

    // let fee = client.get_fee_for_asin("B0DGJC52FP", 999.0, true).await?;
    // println!("Fee for ASIN B0DGJC52FP: ${:.2}", fee);

    let current_local_time = chrono::Local::now();
    println!("Current local time: {}", current_local_time);
    {
        let fees = client
            .get_fees_for_asins(vec![("B0DGJC52FP".to_string(), 999.0)], true, marketplace_ids::US)
            .await?;
        println!("Fees for ASINs: {:?}", fees);
    }
    let current_local_time = chrono::Local::now();
    println!("Current local time: {}", current_local_time);
    {
        let fees = client
            .get_fees_for_asins(vec![("B0DGJC52FP".to_string(), 999.0)], true, marketplace_ids::US)
            .await?;
        println!("Fees for ASINs: {:?}", fees);
    }
    let current_local_time = chrono::Local::now();
    println!("Current local time: {}", current_local_time);
    {
        let fees = client
            .get_fees_for_asins(vec![("B0DGJC52FP".to_string(), 999.0)], true, marketplace_ids::US)
            .await?;
        println!("Fees for ASINs: {:?}", fees);
    }
    let current_local_time = chrono::Local::now();
    println!("Current local time: {}", current_local_time);

    Ok(())
}