Skip to content
Rust interface for
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
src `Builder::client` to configure the underlying reqwest client Mar 5, 2019
Cargo.toml debug & trace log for requests and responses Feb 22, 2019
LICENSE-APACHE add & MIT/Apache-2.0 licenses Jul 17, 2018
LICENSE-MIT remove `extern crate` from readme Feb 25, 2019

modio-rs License Released API docs Master API docs Travis Build Status

modio provides a set of building blocks for interacting with the API.

The client uses asynchronous I/O, backed by the futures and tokio crates, and requires both to be used alongside. is a drop-in modding solution from the founders of, that facilitates the upload, search, browsing, downloading and trading of mods in-game.


To use modio, add this to your Cargo.toml

modio = "0.3"

Basic Setup

use modio::{Credentials, Error, Modio};
use tokio::runtime::Runtime;

fn main() -> Result<(), Error> {
    let mut rt = Runtime::new()?;
    let modio = Modio::new(

    // create some tasks and execute them
    // let result = rt.block_on(task)?;


// Request a security code be sent to the email address.

// Wait for the 5-digit security code
let token = rt.block_on(modio.auth().security_code("QWERT"))?;

// Create an endpoint with the new credentials
let modio = modio.with_credentials(Credentials::Token(token));

See full example.


use modio::filter::Operator;
use modio::games::GamesListOptions;

// List games with filter `name_id = "0ad"`
let task =
        .name_id(Operator::Equals, "0ad"),

let games = rt.block_on(task)?;


// List all mods for 0 A.D.
let mods = rt.block_on(;

// Get the details of the `balancing-mod` mod
let balancing_mod = rt.block_on(modio.mod_(5, 110).get())?;


use modio::download::{ResolvePolicy, DownloadAction};

// Download the primary file of a mod.
let action = DownloadAction::Primary {
    game_id: 5,
    mod_id: 19,
let (len, out) = rt.block_on(, out))?;

// Download the specific file of a mod.
let action = DownloadAction::File {
    game_id: 5,
    mod_id: 19,
    file_id: 101,
let (len, out) = rt.block_on(, out))?;

// Download the specific version of a mod.
// if multiple files are found then the latest file is downloaded.
// Set policy to `ResolvePolicy::Fail` to return with `ErrorKind::Download(DownloadError::MultipleFilesFound)`.
let action = DownloadAction::Version {
    game_id: 5,
    mod_id: 19,
    version: "0.1".to_string(),
    policy: ResolvePolicy::Latest,
let (len, out) = rt.block_on(, out))?;


See examples directory for some getting started examples.


Licensed under either of


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.