new Alliances(agent)
Create a new Alliances function using the given agent
.
Parameters:
Name | Type | Description |
---|---|---|
agent |
ESIAgent | The ESI agent |
Members
Methods
-
all()
-
List all active player alliances. This route is cached for up to 3600 seconds.
This makes an HTTP GET request to
/alliances/
. The route version isv1
.On success, this resolves to list of Alliance IDs.
Returns:
A Promise that resolves to the parsed JSON of the response.
- Type
- Promise.<Array.<Number>>
-
get(id)
-
Create a new Alliance end point targeting the particular alliance by
id
.Parameters:
Name Type Description id
Number The alliance id
Returns:
- Type
- Alliance
-
names(ids)
-
Resolve a set of alliance IDs to alliance names. This route is cached for up to 3600 seconds.
This makes an HTTP GET request to
/alliances/names/
. The route version isv1
.The array length of
ids
must be between1
and100
.On success, this resolves to list of id/name associations. An example result is:
[ { "id": 1000171, "name": "Republic University" } ]
Note that the type schema of the response is modified from what is defined in ESI. Specifically:
- The
alliance_id
property is renamed toid
. - The
alliance_name
property is renamed toname
.
Parameters:
Name Type Description ids
Array.<Number> A comma separated list of alliance IDs. If not provided then the names of all alliances will be returned.
Returns:
A Promise that resolves to the parsed JSON of the response.
- Type
- Promise.<Array.<Object>>
- The