earthmc 2.0.1

Async client for interacting with the EarthMC API
Documentation
use std::{str::FromStr, sync::Arc};

use earthmc::{client::ClientBuilder, retry_strategy::NeverRetry};
use parking_lot::Mutex;
use uuid::Uuid;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = ClientBuilder::default()
        .retry_strategy(Arc::new(Mutex::new(NeverRetry)))
        .build();

    let query =
        [Uuid::from_str("751de3e0-42f1-4da0-bf62-40d1f5096e50")?].to_vec();

    let quarters = client.quarters(query).await?;

    for quarter in &quarters {
        println!(
            r#""{}" is in {} and owned by {:?}"#,
            quarter.name, quarter.town.name, quarter.owner
        );
    }

    Ok(())
}