Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is_player_faction is not part of the response for any faction queries #211

Open
Goltred opened this issue Mar 18, 2021 · 8 comments
Open

Comments

@Goltred
Copy link

Goltred commented Mar 18, 2021

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 :(

@vanderaj
Copy link
Contributor

Can you please include a URL or Postman request that you're using to obtain the data?

@SayakMukhopadhyay
Copy link
Member

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.

@Goltred
Copy link
Author

Goltred commented Mar 18, 2021

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.

@SayakMukhopadhyay
Copy link
Member

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.

@Goltred
Copy link
Author

Goltred commented Mar 18, 2021

I would say that I would care about it as long as:

  1. 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
  2. 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! 👍

@SayakMukhopadhyay
Copy link
Member

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.

@Meekohi
Copy link
Contributor

Meekohi commented Dec 28, 2021

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?

@SayakMukhopadhyay
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants