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_waypointsset tofalse. This function invokes the route withadd_to_beginningset 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 idNumber 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_waypointsset totrue. This function invokes the route withadd_to_beginningset 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 idNumber 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_waypointsset tofalse. This function invokes the route withadd_to_beginningset 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 idNumber 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>