Closed RedstoneWizard08 closed 1 year ago
The /api/browse
route is here if you want to try adding the filters you need:
SpaceDock is open source and pull requests are welcome. If you do, please target the alpha
branch as that's where SpaceDock's dev process starts.
I'll give it a try!
That dev guide link also has a section on starting an instance of SpaceDock locally in Docker, which is extremely helpful for debugging (but may be overkill for a relatively small API change):
https://github.com/KSP-SpaceDock/SpaceDock/wiki/Development-Guide#running-with-docker
I was already doing that lol but yea I'm gonna do dev in docker. Is there like an alpha preview deployed btw so I could use it sooner, before it goes into the stable release?
https://alpha.spacedock.info/ For compleatness beta also exists for later testing: https://beta.spacedock.info/
We are following the usual software dev stages of: alpha,beta,staging,live
No, but there's an alpha server with a separate database:
Useful for public testing but not for accessing data from the production server.
Ok
Done in #466!
Cool! 🎉
What I would like is to be able to filter on the browse API with more parameters like
game_id
andgame_version
to allow for easier use.
Did you decide game_version
wasn't needed?
I should probably fix that lol
We should update the api doc to reflect the new abilities.
@HebaruSan I'm not going to add game_version
since it's not available on the Mod's base class, and I don't want to slow down the query. I think it'll be okay though.
Game_version is a different db table from game id. Thats possibly why.
Yeah.
I dont know how large the impact is. ATM cpu load on the server isnt a big problem. Its your chance to tailor the API to your needs :)
Checking the other table is possible:
alr im adding it
It's added!
Now everything has to go trough testing and we have to put it on production. Its up to @HebaruSan to tell me when its good enough to do so.
Description (What went wrong?):
I'm working on the installer for SpaceWarp over at https://github.com/SpaceWarpDev/Space-Warp-Installer and https://github.com/RedstoneWizard08/Space-Warp-Installer and I'm trying to filter mods on the API for only KSP2, but there is no option for that, and then the pagination breaks because it fetches all mods and some pages will be blank.
Reproduction Steps (What did you do?):
Expected Behavior (What do you think should have happened instead?):
What I would like is to be able to filter on the browse API with more parameters like
game_id
andgame_version
to allow for easier use.Environment (OS/Browser/Plugins/etc):
Extra Information (Screenshots/Error Messages/Javascript Console Output):