Class: Factions

Factions

An api adapter over the end points handling factions via functions in the universe and search ESI endpoints. You should not usually instantiate this directly as its constructor requires an internal api instance.

This is a function class so instances of Factions are functions and can be invoked directly, besides accessing its members. Its default function action is equivalent to all.


new Factions(agent)

Create a new Factions function using the given agent.

Parameters:
Name Type Description
agent ESIAgent

The ESI agent

Members


A Search module instance configured to search over the 'faction' type.

Type:

Methods


all()

Get a list of factions. This route expires daily at 11:05.

This makes an HTTP GET request to /universe/factions/. The route version is v1.

On success, this resolves to a list of factions. An example result is:

[
  {
    "corporation_id": 456,
    "description": "blah blah",
    "faction_id": 1,
    "is_unique": true,
    "militia_corporation_id": 0,
    "name": "Faction",
    "size_factor": 1,
    "solar_system_id": 123,
    "station_count": 1000,
    "station_system_count": 100
  }
]
Returns:

A Promise that resolves to the parsed JSON of the response.

Type
Promise.<Array.<Object>>