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 isv2
.This function invokes the route with
clear_other_waypoints
set tofalse
. This function invokes the route withadd_to_beginning
set tofalse
.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 isv2
.This function invokes the route with
clear_other_waypoints
set totrue
. This function invokes the route withadd_to_beginning
set totrue
.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 isv2
.This function invokes the route with
clear_other_waypoints
set tofalse
. This function invokes the route withadd_to_beginning
set totrue
.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>