modio/modio-sdk-legacy

/games/{game-id}/mods queries return one entry per mod that contains exactly one modfile.

leper opened this issue · 3 comments

leper commented

This seems limiting for mods that release multiple versions, as there either need to be new "mods" for each release, or only a single version of a mod available.

I guess having modfile be modfiles and an array would help with this. Or having another query where one can actually retrieve all files (or just the most recent one) for a mod, or a game.

Well a modfile represents a new build, and we only include one in the main Mod Object to highlight the main file the API consumer needs to focus on. If we were to supply an array of the modfiles for the mod it would duplicate the functionality of:

GET v1/games/{game-id}/mods/{mod-id}/files wouldn't it?

If we return an array of 5 files and you are only interested in one it may be a little verbose?

leper commented

Does this query actually return multiple files? I guess I'll have to fix my test data a bit.

Agreed that it might be a bit verbose, but then I do wonder why there is a specific modfile object and that isn't flattened into the parent object.

Yes that query returns multiple. By default with mods, we include the modfile object which is the most recent "primary" build that the modder has uploaded. But if you hit the endpoint

GET v1/games/{game-id}/mods/{mod-id}/files

You will get all files uploaded to the mod, including the "primary" build and all others.