new Sovereignty(agent)
Create a new Sovereignty instance using the given agent
.
Parameters:
Name | Type | Description |
---|---|---|
agent |
ESIAgent | The ESI Agent |
Methods
-
campaigns()
-
Shows sovereignty data for campaigns. This route is cached for up to 5 seconds.
This makes an HTTP GET request to
/sovereignty/campaigns/
. The route version isv1
.On success, this resolves to a list of sovereignty campaigns. An example result is:
[ { "attackers_score": 0.4, "campaign_id": 32833, "constellation_id": 20000125, "defender_id": 1695357456, "defender_score": 0.6, "event_type": "station_defense", "participants": [ { "alliance_id": 0, "score": 0 } ], "solar_system_id": 30000856, "start_time": "2016-10-29T14:34:40Z", "structure_id": 61001096 } ]
Returns:
A Promise that resolves to the parsed JSON of the response.
- Type
- Promise.<Array.<Object>>
-
map()
-
Shows sovereignty information for solar systems. This route is cached for up to 3600 seconds.
This makes an HTTP GET request to
/sovereignty/map/
. The route version isv1
.On success, this resolves to a list of sovereignty information for solar systems in New Eden. An example result is:
[ { "alliance_id": 0, "corporation_id": 0, "faction_id": 500001, "system_id": 30045334 } ]
Returns:
A Promise that resolves to the parsed JSON of the response.
- Type
- Promise.<Array.<Object>>
-
structures()
-
Shows sovereignty data for structures. This route is cached for up to 120 seconds.
This makes an HTTP GET request to
/sovereignty/structures/
. The route version isv1
.On success, this resolves to a list of sovereignty structures. An example result is:
[ { "alliance_id": 498125261, "solar_system_id": 30000570, "structure_id": 1018253388776, "structure_type_id": 32226, "vulnerability_occupancy_level": 2, "vulnerable_end_time": "2016-10-29T05:30:00Z", "vulnerable_start_time": "2016-10-28T20:30:00Z" } ]
Returns:
A Promise that resolves to the parsed JSON of the response.
- Type
- Promise.<Array.<Object>>