Crate modark

Source
Expand description

This is a library crate for working with the Mod Archive website via its XML API. Please check out the documentation for ModInfo and its methods for more info, do be sure to look at the examples aswell!

§Example

§Get module info as a struct using a module ID

use modark::ModInfo;

fn main() {
    let modinfo = ModInfo::get(51772).unwrap();
    println!("{:#?}", modinfo);
}

§Example

§Resolve filename to ID then use ID to get the info as struct

use modark::ModInfo;

fn main() {
    let modid = ModInfo::resolve_filename("noway.s3m").unwrap()[0].id;
    let modinfo = ModInfo::get(modid).unwrap();
    println!("{:#?}", modinfo);
}

There are more examples other than these which showcase more, remember to check the examples directory!

Structs§

ModInfo
Struct containing all of the info about a module
ModSearch
ModSearchResolve
Simple struct to represent a search result, id and filename will be provided in each

Enums§

Error
Error enum for functions in the crate that return a Result