Closed musicmage4114 closed 7 years ago
going to object to this one.
for your example there, you could resolve the ids with:
curl -d '[60014719, 691]' -H 'Content-Type: application/json' https://esi.tech.ccp.is/latest/universe/names/
which returns:
[
{
"id": 60014719,
"name": "Cistuvaert V - Moon 12 - Center for Advanced Studies School",
"category": "station"
},
{
"id": 691,
"name": "Rifter Blueprint",
"category": "inventory_type"
}
]
resolving ids to names is something that only really needs to happen once per ID, plus you can batch your name resolution calls to increase efficiency. having this in every return would be an excessive amount of redundant information, something ESI is actively trying to avoid.
You are forcing developers to use 2 calls minimum to save making calls within the api which are x times faster? The amount of overhead you are creating is immense, not to mention the extra code for developers and slower results (you always need 2 round trips of data to present your data this way)
Feature request
Route
Most routes that indicate relationships between entities. In particular:
/alliances/{alliance_id}/corporations/ /characters/{character_id}/standings/ /characters/affiliation/ /characters/{character_id}/clones/ /characters/{character_id}/contacts/ /characters/{character_id}/corporationhistory/ /corporations/{corporation_id}/alliancehistory/ /corporations/{corporation_id}/members/ /fleets/{fleet_id}/members/ /characters/{character_id}/location/ /markets/groups/ /opportunities/ /characters/{character_id}/opportunities/ /characters/{character_id}/planets/ /characters/{character_id}/skillqueue/ /characters/{character_id}/chat_channels/ /sovereignty/ /universe/bloodlines/ /universe/factions/ /universe/races/ /universe/regions/ /characters/{character_id}/wallets/ /characters/{character_id}/skills/ /corporations/npccorps/ /characters/{character_id}/blueprints/ /characters/{character_id}/assets/
Use case
Calling only a single endpoint and receiving name information would allow users to narrow any subsequent searches, rather than needing to try each ID returned in sequence, and in many cases would eliminate the need to query a returned ID at all.
Note that this data is already returned as part of the XML API in several endpoints (character standings comes to mind, but there are definitely others).
Example returns
GET /characters/{character_id}/blueprints/
item_id: 1000000010495 location_flag: "Hangar" location_id: 60014719 location_name: "Cistuvaert V - Moon 12 - Center for Advanced Studies School" material_efficiency: 0 quantity: 1 runs: -1 time_efficiency: 0 type_id: 691 name: "Rifter Blueprint"