new Insurance(agent)
Create a new Insurance instance using the given agent
.
Parameters:
Name | Type | Description |
---|---|---|
agent |
ESIAgent | The ESI agent |
Methods
-
prices()
-
Return available insurance levels for all ship types. This route is cached for up to 3600 seconds.
This makes an HTTP GET request to
/insurance/prices/
. The route version isv1
.On success, this resolves to a list of insurance levels for all ship types. An example result is:
[ { "levels": [ { "cost": 10, "name": "Basic", "payout": 20 } ], "type_id": 1 } ]
Returns:
A Promise that resolves to the parsed JSON of the response.
- Type
- Promise.<Array.<Object>>