spacetraders-client 0.1.0

Async Rust client for the SpaceTraders API v2 with priority-aware rate limiting and retry
Documentation
use crate::client::{ClientError, RequestPriority, StClient};
use crate::types;

impl StClient {
    pub async fn get_supply_chain(&self) -> Result<types::GetSupplyChainResponse, ClientError> {
        self.get_supply_chain_with_priority(RequestPriority::Normal)
            .await
    }

    pub async fn get_supply_chain_with_priority(
        &self,
        priority: RequestPriority,
    ) -> Result<types::GetSupplyChainResponse, ClientError> {
        self.send("get_supply_chain", priority, || {
            self.inner.get_supply_chain()
        })
        .await
    }
}