Class: Squad

Squad

An api adapter over the end points handling a specific squad in a character's fleet via functions in the fleets ESI endpoints. You should not usually instantiate this directly as its constructor requires an internal api instance.


new Squad(fleet, squadId)

Create a new Squad adaptor owned by the given fleet corresponding to the given squadId.

Parameters:
Name Type Description
fleet Fleet

The owning fleet

squadId Number

The squad id of this instance

Methods


del()

Delete a fleet squad, only empty squads can be deleted.

This makes an HTTP DELETE request to /fleets/{fleet_id}/squads/{squad_id}/. The route version is v1.

On success, this resolves to an empty object.

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

  • esi-fleets.write_fleet.v1
Returns:

A Promise that resolves to an empty object.

Type
Promise.<Object>

rename(name)

Rename a fleet squad.

This makes an HTTP PUT request to /fleets/{fleet_id}/squads/{squad_id}/. The route version is v1.

The route parameter, naming, is built implicitly by the function. The function argument name maps to the name property of the naming route parameter. The string length of name can be at most 10.

On success, this resolves to an empty object.

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

  • esi-fleets.write_fleet.v1
Parameters:
Name Type Description
name String

Name string.

Returns:

A Promise that resolves to an empty object.

Type
Promise.<Object>