Class: Effects

Effects

An api adapter over the end points handling multiple dogma effects via functions in the dogma 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 Effects are functions and can be invoked directly, besides accessing its members. Its default function action is equivalent to get or all depending on if an id is provided.


new Effects(agent)

Create a new Effects function using the given agent.

Parameters:
Name Type Description
agent ESIAgent

The ESI agent

Methods


all()

Get a list of dogma effect ids. This route expires daily at 11:05.

This makes an HTTP GET request to /dogma/effects/. The route version is v1.

On success, this resolves to a list of dogma effect ids.

Returns:

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

Type
Promise.<Array.<Number>>

get(id)

Create a new Effect end point targeting the particular effect by id.

Parameters:
Name Type Description
id Number

The effect id

Returns:
Type
Effect