esi-issues
esi-issues copied to clipboard
Character asset names documentation
Route
https://esi.tech.ccp.is/latest/#!/Assets/post_characters_character_id_assets_names
Example returns
Any item that can not have a name in-game (modules, packaged ships, etc.):
[
{
"item_id": 1000527721812,
"name": "None"
}
]
Any item that can have a in-game name, but, does not have a name set
[
{
"item_id": 1004329142345,
"name": ""
}
]
Any item that have a in-game name, will return the name.
[
{
"item_id": 120677503,
"name": "GoldenGnu's Amarr Shuttle"
}
]
Note: GoldenGnu's Amarr Shuttle
is an example value
Reference:
This is all the asset types I know works:
(asset.group == "Audit Log Secure Container"
|| asset.group == "Cargo Container"
|| asset.group == "Freight Container"
|| asset.group == "Secure Cargo Container"
|| asset.group == "Biomass"
|| asset.category == "Deployable"
|| asset.category == "Ship"
|| asset.category == "Structure")
&& asset.isSingleton() //Only unpacked assets can have a name, this is true for all the groups and categories
Let me think about this a bit...
Would it be easier to have it return "Cannot have a name" for those that cannot be given names, and "Name not set" for things that can be given names?
That being said, unless TechCo wants people to be able to hide containers and the like by purposely naming them something that matches the "cant have a name" return, it might be worth also adding another return that specifies whether the item's nameable as a true/false value. This would let people read through assets for the "is_nameable" return, and then pull out the names, rather than reading off the "name" field and hoping players arent getting creative with names.
The best options for me:
- Make name optional and only return it if the item have a name set in-game
- Do not return anything for items that does not have a name set in-game (no itemID and no name)
- Do not change the endpoint (it may not be perfect, but, it works just fine, if you only use it for stuff that can have names: unpacked containers and ships, the “” (empty string) return is perfect for stuff that does not have a name)