Official SDK
Rust SDKThe async client uses rustls TLS. Match Error::Api to inspect the HTTP status, stable code and required scope.
Installation
Example
[dependencies]
as213905-sdk = { git = "https://git.datacoria.com/Phylex/as213905-sdk.git", tag = "v1.1.0" }
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
Complete example
Example
use as213905_sdk::Client;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::new(std::env::var("AS213905_API_KEY")?);
    let traffic = client.traffic(Some(7), None, None).await?;
    println!("p95: {} kbps", traffic.p95_kbps);
    Ok(())
}
Production usage
Credential handling
Read the API key from a secret or environment variable. Reuse one client instance, set request cancellation in your application, and handle 429 responses according to Retry-After.