modio-rs
modio
provides a set of building blocks for interacting with the mod.io API.
The client uses asynchronous I/O, backed by the futures
and tokio
crates, and requires both to be used alongside.
mod.io
mod.io is a drop-in modding solution from the founders of ModDB.com, that facilitates the upload, search, browsing, downloading and trading of mods in-game.
Usage
To use modio
, add this to your Cargo.toml
[]
= "0.2"
Basic Setup
extern crate modio;
extern crate tokio;
use ;
use Runtime;
Authentication
// Request a security code be sent to the email address.
rt.block_on?;
// Wait for the 5-digit security code
let token = rt.block_on?;
// Create an endpoint with the new credentials
let modio = modio.with_credentials;
See full example.
Games
use Operator;
use GamesListOptions;
// List games with filter `name_id = "0ad"`
let task = modio.games.list;
let games = rt.block_on?;
Mods
// 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?;
Examples
See examples directory for some getting started examples.
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
Contribution
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.