new Alliance(agent, allianceId)
Create a new Alliance for the given agent
provider and specific
allianceId
.
Parameters:
Name | Type | Description |
---|---|---|
agent |
ESIAgent | The agent used to generate web requests |
allianceId |
Number | The alliance id that is used for all requests |
Methods
-
corporations()
-
List all current member corporations of an alliance. This route is cached for up to 3600 seconds.
This makes an HTTP GET request to
/alliances/{alliance_id}/corporations/
. The route version isv1
.On success, this resolves to list of corporation IDs.
Returns:
A Promise that resolves to the parsed JSON of the response.
- Type
- Promise.<Array.<Number>>
-
icon()
-
Get the icon urls for a alliance. This route is cached for up to 3600 seconds.
This makes an HTTP GET request to
/alliances/{alliance_id}/icons/
. The route version isv1
.On success, this resolves to urls for icons for the given alliance id and server. An example result is:
{ "px128x128": "https://imageserver.eveonline.com/Alliance/503818424_128.png", "px64x64": "https://imageserver.eveonline.com/Alliance/503818424_64.png" }
Returns:
A Promise that resolves to the parsed JSON of the response.
- Type
- Promise.<Object>
-
info()
-
Public information about an alliance. This route is cached for up to 3600 seconds.
This makes an HTTP GET request to
/alliances/{alliance_id}/
. The route version isv2
.On success, this resolves to public data about an alliance. An example result is:
{ "alliance_name": "C C P Alliance", "date_founded": "2016-06-26T21:00:00Z", "executor_corp": 98356193, "ticker": "<C C P>" }
Returns:
A Promise that resolves to the parsed JSON of the response.
- Type
- Promise.<Object>