orda

Crates.ioorda
lib.rsorda
version0.1.2
created_at2025-11-03 03:14:42.152282+00
updated_at2025-11-07 02:30:17.307501+00
descriptionRust client library for the aoe4guides.com API
homepagehttps://github.com/gzordrai/orda
repositoryhttps://github.com/gzordrai/orda
max_upload_size
id1913830
size70,906
Thibault Tisserand (gzordrai)

documentation

https://docs.rs/orda/latest/orda/

README

orda

Rust client library for the aoe4guides.com API.

Orda provides a simple and type-safe interface for fetching build orders, favorites, and other data from aoe4guides.com.

Internally, it wraps the public REST API using reqwest and serde.

Features

  • Optional civilization and sort filters
  • Async-first API powered by reqwest
  • Lightweight - no global runtime, compatible with any Tokio environment

Install

Add Orda to your project using Cargo:

cargo add orda

Or manually in your Cargo.toml:

[dependencies]
orda = "0.1.1"

Usage

use orda::{OrdaClient, Civilization, SortBy};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = OrdaClient::new();

    // Fetch API status
    let status = client.get_status().await?;

    println!("API status: {}", status.status);

    // Fetch the 10 most popular French builds
    let builds = client
        .get_builds(Civilization::Fre, Some(SortBy::Score), false)
        .await?;

    println!("Fetched {} builds", builds.len());

    // Fetch a single build by ID
    let build = client.get_build("00I7J47dv26cPbKmXYkO", false).await?;

    println!("Build title: {:?}", build.title);

    Ok(())
}

Api overview

  • get_status() => Returns the API status (always "running")
  • get_builds(civ, order_by, overlay) => Fetches up to 10 build orders
  • get_build(id, overlay) => Fetches a single build order by ID
  • get_favorites(user_id, civ, order_by, overlay) => Fetches user favorites

License

Licensed under the Apache 2.0 license.

See the LICENSE file for details

Commit count: 0

cargo fmt