Class: Races

Races

An api adapter over the end points handling races via functions in the universe 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 Races are functions and can be invoked directly, besides accessing its members. Its default function action is equivalent to all.


new Races(agent)

Create a new Races function using the given agent.

Parameters:
Name Type Description
agent ESIAgent

The ESI agent

Methods


all()

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

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

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

[
  {
    "alliance_id": 500001,
    "description": "Founded on the tenets of patriotism and hard work...",
    "name": "Caldari",
    "race_id": 1
  }
]
Returns:

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

Type
Promise.<Array.<Object>>