new CharacterInfo(agent, characterId)
Create a new CharacterInfo for the given agent
, targeting the
specific characterId
.
Parameters:
Name | Type | Description |
---|---|---|
agent |
ESIAgent | The agent used to generate web requests |
characterId |
Number | The id used for all character requests |
Methods
-
history()
-
Get a list of all the corporations a character has been a member of. This route is cached for up to 3600 seconds.
This makes an HTTP GET request to
/characters/{character_id}/corporationhistory/
. The route version isv1
.On success, this resolves to corporation history for the given character. An example result is:
[ { "corporation_id": 90000001, "is_deleted": false, "record_id": 500, "start_date": "2016-06-26T20:00:00Z" } ]
Returns:
A Promise that resolves to the parsed JSON of the response.
- Type
- Promise.<Array.<Object>>
-
info()
-
Public information about a character. This route is cached for up to 3600 seconds.
This makes an HTTP GET request to
/characters/{character_id}/
. The route version isv4
.On success, this resolves to public data for the given character. An example result is:
{ "alliance_id": 0, "ancestry_id": 19, "birthday": "2015-03-24T11:37:00Z", "bloodline_id": 3, "corporation_id": 109299958, "description": "", "gender": "male", "name": "CCP Bartender", "race_id": 2, "security_status": 0 }
Returns:
A Promise that resolves to the parsed JSON of the response.
- Type
- Promise.<Object>
-
portrait()
-
Get portrait urls for a character. This route is cached for up to 3600 seconds.
This makes an HTTP GET request to
/characters/{character_id}/portrait/
. The route version isv2
.On success, this resolves to public data for the given character. An example result is:
{ "px128x128": "https://imageserver.eveonline.com/Character/95465499_128.jpg", "px256x256": "https://imageserver.eveonline.com/Character/95465499_256.jpg", "px512x512": "https://imageserver.eveonline.com/Character/95465499_512.jpg", "px64x64": "https://imageserver.eveonline.com/Character/95465499_64.jpg" }
Returns:
A Promise that resolves to the parsed JSON of the response.
- Type
- Promise.<Object>