Fetch all Alliances and Corporations to local Database and keep it up to date


(Rtg Quack) #1

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.

Does anybody have a suggestion for this?

(jemmi) #2

They already have an in-game Corp search tool that works pretty good.

(Blacksmoke16) #3

Yes but that doesn’t address his question.

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.

(EveDataRules) #4

You are going to want your own database for this for it to work at any decent speed for typeahead.

(Rtg Quack) #5

Any idea on how to fetch all corporations as well a delta (changes) after some time?

I hardly doubt to fetch.
then for each:
then for each:

is the solution, in particular if I have to keep an eye on the API limits.

I also have been looking around for some static or 3rd party API but wasn’t successful.

(Rtg Quack) #6

Any suggestion on how to improve the functionality are highly welcome!

This is a quite exensive and time consuming procedure.

  1. Get a list of all alliances
  2. For each alliance get the detail of the alliance
  3. For each alliance get get a list of all corporations (by ID)
  4. For each corporation in the list of alliances get the details about a alliance

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?

(Catherine Solenne) #7

Refresh locally once per day or whatever seems appropriate to you for typeahead, then hit /search/ if you get an input that you cant find.

If you use Etags the daily refresh of the local cache should be pretty light since most info will be unchanged

(Blacksmoke16) #8

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.

(system) #9

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.