elitebgs
elitebgs copied to clipboard
is_player_faction is not part of the response for any faction queries
Hello!
I noticed that the field is_player_faction
is not returned for responses including the EBGSFactionV5 model... Dunno if this is a limitation of underlying system/data, but if a fix is not possible maybe it could be removed from the model instead for docs to be more consistent?
It's sad that this forces me to make further requests to other api's to know if a faction is player owned or not :(
Can you please include a URL or Postman request that you're using to obtain the data?
Hello @Goltred , this is a limitation of the underlying journal provided by Elite. This data is not available to us and is only possible if crowdsourced. This field was added as a forward compatibility for when such a thing gets added. Unfortunately, in all these years that never happened and I cannot remove this field as that would be breaking change. What I can try and do though is update the docs to note that this field is not yet implemented.
Just for documentation purposes, this is an example request: https://elitebgs.app/api/ebgs/v5/factions?name="Orgen Citizen Party"
@SayakMukhopadhyay I understand, documenting that would be nice (I noticed you commented the model itself but the docs would be a better spot).
I wonder... assuming you guys have some kind of access between the eddb api you provide here: https://elitebgs.app/apis/eddb and the elitebgs api. Is it possible to correlate data between the two APIs in the backend?
The eddb api does bring back a field for is_player_faction
so maybe you guys can work some magic that can prevent me from making a bunch of requests (one request per faction) just to know if a faction is a player faction or not.
That is technically possible but I would rather not. The is_player_faction
field in the EDDB API is crowd sourced and as I have mentioned before, I want to keep EliteBGS API strictly from ingame. Still, I can look into this. Maybe if someone passes an extra parameter to confirm that they are fine with getting that field from EDDB, I will be comfortable enough to do it. Let me mull over this a bit.
I would say that I would care about it as long as:
- Its internal communication between the two datasets (e.g. an actual extra fetch from the db and not just a bunch of requests that you would make behind the scenes) and
- As you say, it is a conscious decision to get extra data from there... something amongst the lines of 'eddb_faction_details=true`
If the internal connection is not possible, then yeah, I don't think it makes sense to make such a mix between the two and clients should be the ones just using the data they have available :)
Btw, great docs, api surface and response time! 👍
It will have to be via a network call since the dbs for eddb api and elitebgs api are seperate. It being an internal call shouldn't introduce too much latency but I will see. It's late now so I will look into this in the weekend.
Is there any official source from FDev for whether a minor faction is a "player faction" or not? How does https://inara.cz/galaxy-playerfactions get populated?
Is there any official source from FDev for whether a minor faction is a "player faction" or not? How does https://inara.cz/galaxy-playerfactions get populated?
There is no official source of that. INARA and EDDB both crowdsource that data.