Class: Insurance

Insurance

An api adapter that provides functions for accessing the insurance ESI end points. You should not usually instantiate this directly as its constructor requires an internal api instance.


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 is v1.

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>>