esi / esi-issues

Issue tracking and feature requests for ESI
https://esi.evetech.net/
209 stars 23 forks source link

Add type_id to GET /characters/{character_id}/ #210

Open CarbonAlabel opened 7 years ago

CarbonAlabel commented 7 years ago

Characters, like corporations, alliances, and every other object in EVE, have a type ID, which for characters varies depending on their race and bloodline. I would find it useful to have that type ID returned by this endpoint, or to have it otherwise available.

polarina commented 7 years ago

You have the ancestry_id provided by the endpoint (and bloodline_id too, redundantly so and thus should be removed from the endpoint). Can you not use those to derive the character's type_id?

regner commented 7 years ago

I don't actually know of anywhere in the static data that is defined. I think it was hard coded. Don't hold me to that though as I don't have the SDE in front of me to double check.

CarbonAlabel commented 7 years ago

It isn't defined in the SDE. The only way of obtaining this data programmatically (that I know of) is by matching the bloodline name to type ID names, as they seem to follow the pattern of "Character"+bloodlineName, though this is less than ideal for obvious reasons.

regner commented 7 years ago

Yea I seemed to remember it being defined in code and not static data.

ddavaham commented 7 years ago

This data is defined in the SDE in the chrBloodlines Table and the chrRace table and the chrAncestries table. A characters type could easily be derived from this information with a small method or class to determine it based those attributes. Please look up the character types based on the groupID 1 in the invTypes table of the SDE.

As far as the redundancy goes, this is not redundant. Either you have these ID's listed in the output, or the API Consumer has to write a script to determine what these attributes would be based on the lowest type Id,

ddavaham commented 6 years ago

Please ignore my comment above. I have no idea what I was talking about back then.