Class: Autopilot

Autopilot

An api adapter that provides functions for modifying the character's in-game waypoints and destination via functions in the user interface ESI endpoints. You should not usually instantiate this directly as its constructor requires an internal api instance.


new Autopilot(agent, token)

Create a new Autopilot for the given agent provider. Requires an access token for a character currently in game.

Parameters:
Name Type Description
agent ESIAgent

The agent used to generate web requests

token String

Access token for the character in game

Methods


append(id)

Set a solar system as autopilot waypoint.

This makes an HTTP POST request to /ui/autopilot/waypoint/. The route version is v2.

This function invokes the route with clear_other_waypoints set to false. This function invokes the route with add_to_beginning set to false.

On success, this resolves to an empty object.

This function must be used with an SSO token that has the following scopes:

  • esi-ui.write_waypoint.v1
Parameters:
Name Type Description
id Number

The destination to travel to, can be solar system, station or structure's id.

Returns:

A Promise that resolves to an empty object.

Type
Promise.<Object>

destination(id)

Set a solar system as autopilot waypoint.

This makes an HTTP POST request to /ui/autopilot/waypoint/. The route version is v2.

This function invokes the route with clear_other_waypoints set to true. This function invokes the route with add_to_beginning set to true.

On success, this resolves to an empty object.

This function must be used with an SSO token that has the following scopes:

  • esi-ui.write_waypoint.v1
Parameters:
Name Type Description
id Number

The destination to travel to, can be solar system, station or structure's id.

Returns:

A Promise that resolves to an empty object.

Type
Promise.<Object>

prepend(id)

Set a solar system as autopilot waypoint.

This makes an HTTP POST request to /ui/autopilot/waypoint/. The route version is v2.

This function invokes the route with clear_other_waypoints set to false. This function invokes the route with add_to_beginning set to true.

On success, this resolves to an empty object.

This function must be used with an SSO token that has the following scopes:

  • esi-ui.write_waypoint.v1
Parameters:
Name Type Description
id Number

The destination to travel to, can be solar system, station or structure's id.

Returns:

A Promise that resolves to an empty object.

Type
Promise.<Object>