You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.
Since we will only support showing/downloading mods with a certain extension (due to being portable, somewhat similar to .umod for those that spent too much time with UT; actually just zip files that contain a mod.json file with some data we use, and the files for the mod), it would be nice to do that filtering when submitting the query.
It should be working (unless I'm missing something in the documentation), but the below example does not seem to do what it should.
curl --request GET 'https://api.mod.io/v1/games/57/mods?api_key=use_your_own&filename-lk=*.zip'
curl --request GET 'https://api.mod.io/v1/games/57/mods?api_key=use_your_own&filename-lk=*.zio'
Both return the same results (5, that is), while I would expect the second one to not return any result, as the only files present are some demo.zip files (which also does not seem to have the same md5sum as the filehash would indicate).
The text was updated successfully, but these errors were encountered:
The filtering is working correctly, however, because filename is nested within the modfile object the filter is not being applied. It does not return an error because its an invalid filter so the api simply ignores it. If you supply a filter that is an invalid type (for instance you try to filter the id column by a string) it will return an error. This is what was meant by the documentation stating that only bottom/base level objects can be filtered by. This is something I want to support in the near future, but for the meantime, if you wanted to filter by the filename you would have to do:
curl --request GET 'https://api.mod.io/v1/games/57/mods/{id-here}/files?api_key=use_your_own&filename-lk=*.zip'
About invalid filters not returning an error, but invalit types doing so that seems slightly strange. I guess not complaining about the former is easier than actually checking if they exist, but from a logical point of view filtering based on x and nothing having x so the filter does not match would make me expect not getting any result.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Since we will only support showing/downloading mods with a certain extension (due to being portable, somewhat similar to .umod for those that spent too much time with UT; actually just zip files that contain a mod.json file with some data we use, and the files for the mod), it would be nice to do that filtering when submitting the query.
It should be working (unless I'm missing something in the documentation), but the below example does not seem to do what it should.
Both return the same results (5, that is), while I would expect the second one to not return any result, as the only files present are some demo.zip files (which also does not seem to have the same md5sum as the filehash would indicate).
The text was updated successfully, but these errors were encountered: