nickelc / modio-rs

🦀 Rust interface for integrating https://mod.io - a modding API for game developers
Apache License 2.0
15 stars 5 forks source link

`Mod` struct only has one `File` but mods may have multiple files #4

Closed valentinegb closed 1 year ago

valentinegb commented 1 year ago

I am developing a mod manager for a game where the mods usually have two files for the two different platforms that the game is on, however it doesn't seem like there's a way to pick which mod file to get from a Mod structure. Mod should instead have a modfiles (or imo mod_files) field with a type of Vec<File>. When there are no mod files, instead of Option::None the field could just be an empty Vec.

nickelc commented 1 year ago

The field reflects the early days of the mod.io API and is a bit cumbersome to use with the introduction of the target platform feature.

I recommend using the Mod::platforms field to get IDs of the modfiles currently live for the mod and use the modfile endpoints to get the their details.