eve-val/evelink

getting "EVE SYSTEM" instead of actual character name

responsiblet opened this issue · 3 comments

When I use...

Using the raw access level to get the name of a character

api = evelink.api.API()
response = api.get('eve/CharacterName', {'IDs': [1]})
print (response.result.find('rowset').findall('row')[0].attrib['name'])

Using the wrapped access level to get the name of a character

eve = evelink.eve.EVE()
response = eve.character_name_from_id(1)
print (response.result)


... I get "EVE SYSTEM" instead of the actual character name. How can I get my actual character name? My wallet balance returns correctly in the given example.

Thank you for any help you can give.

bitmoji

ayust commented

The character name you get back is the one that corresponds to the ID you passed in. Character ID 1 is the character named EVE System.

If you're trying to find the character name that corresponds to an API key or SSO token that you've provided, you don't want to use EVE.character_name_from_id() - instead, you want to use Account.key_info().

Thanks for the reply. When i do so i get:
NameError: name 'Account' is not defined

ayust commented

The Account class lives in the evelink.account module.