ftbapi 1.0.0

A Rust wrapper.
Documentation

FTB API

A Rust wrapper.


Installation

cargo add ftbapi

Usage

use ftbapi::FTB;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let ftb = FTB::new()?;

    let modpacks = ftb.search_modpacks("Ocean", 5).await?;
    let modpack = ftb.get_modpack(modpacks.ftb_ids[0]).await?;
    let version_id = modpack.versions[0].id;
    let version = ftb.get_modpack_version(modpack.id, version_id).await?;

    for file in version.files.iter() {
        println!("{}/{}", file.install_path, file.name);
    }

    Ok(())
}

Credit

License

MIT