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"] }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(())
}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.