[API Request] Option to add specific keys to multi request

A place to talk about the official Factorio mod portal (https://mods.factorio.com)
Post Reply
User avatar
LuziferSenpai
Filter Inserter
Filter Inserter
Posts: 351
Joined: Tue Jul 08, 2014 10:06 am
Contact:

[API Request] Option to add specific keys to multi request

Post by LuziferSenpai »

Hey,

it would be nice if we could add keys from the result entry, to the /api/mods endpoint, but with a queryparameter.

So as a user you would add for example: keylist=name,owner,summary,title,thumbnail,tags and it would ONLY give these keys back.
With that we can also get more information that would be needed eventually, without calling each mod's short or long information, which would increase api calls.

Greetz,

Luzifer
Coding is awesome!
Animes are love!
Factorio is life!

My MODs:
Click

Greetz,

Senpai

User avatar
vinzenz
Factorio Staff
Factorio Staff
Posts: 196
Joined: Mon Aug 02, 2021 6:45 pm
Contact:

Re: [API Request] Option to add specific keys to multi request

Post by vinzenz »

Most of the time these requests are served straight from redis cache, so any customisation options here actually increase load on the backend. In general I prefer third party implementations to make a few more api calls in the beginning and then work of their own cache, instead of requesting everything on-demand. This is how Factorio 1.1 works and what the mod portal is optimized for.
bringing the oops to devops

User avatar
LuziferSenpai
Filter Inserter
Filter Inserter
Posts: 351
Joined: Tue Jul 08, 2014 10:06 am
Contact:

Re: [API Request] Option to add specific keys to multi request

Post by LuziferSenpai »

Yea, what I'm working on doesnt allow for a cache, because its a simple HTML page that shows the current "modpack" a user uses.
I wanted to design it to look like the mod portal, but with the data that is currently avaible that is not good, when I would need to request for each mod itself.

But thanks for the answer, I understand the reasoning behind it.
Coding is awesome!
Animes are love!
Factorio is life!

My MODs:
Click

Greetz,

Senpai

Post Reply

Return to “Mod portal Discussion”