I would like to implement a autosuggest field to select a corporation by ticker or name. Except for /search/?categories=corporation I had not found any method ESI offers to search for a corporation.
An (expensive) option would be to fetch all corporations on a regular base and manage a full corp database inside my application.
You’re best bet is prob using the search endpoint and a character/time limit between lookups. Then just pass the resulting IDs thru the bulk id -> name endpoint and display.
Any suggestion on how to improve the functionality are highly welcome!
This is a quite exensive and time consuming procedure.
Get a list of all alliances /latest/alliances/
For each alliance get the detail of the alliance /latest/alliances/{alliance_id}/
For each alliance get get a list of all corporations (by ID) /latest/alliances/{alliance_id}/corporations/
For each corporation in the list of alliances get the details about a alliance /latest/corporations/{coproration_id}/
All in all the ammount of requests is reasonable. We have > 3000 alliances and >11000 corporations. ESI repsonds sometimes with a 502 Bad Gateway. Because of this I have to track what has been updated and where to resume.
I assume Alliance and Corporation data is mort the less stable except the ammount of members, and more critical for my appilcation, the assignment of corporations to alliances.
Does anybody has a smart solution on how to keep a local alliance and corporation database stable?
If you only need the name of each corporation, you could replace step 4 with a bulk ID -> Name lookup via https://esi.evetech.net/ui/#/Universe/post_universe_names. But if you require additional information you would have to lookup each corporation.
Also note that this will only work for corporations that are members of an alliance.