new API(service, source, agent, language, timeout, maxConcurrent, minTime)
Create a new API with the given configuration provided in a single object map. If no argument is provided, the defaults are used. Note that the service URL should not end with a '/'.
Parameters:
Name | Type | Description |
---|---|---|
service |
String | URL to the ESI service, defaults to
|
source |
String | Data source used, defaults to |
agent |
String | Custom user agent string to send with each request, which defaults to this project but really should be set for your app |
language |
String | Language character code, defaults to |
timeout |
Number | Request timeout in milliseconds, defaults to
|
maxConcurrent |
Number | Maximum number of requests running at once, defaults to 0 (unlimited) |
minTime |
Number | Minimum time before launching another request (in milliseconds), defaults to 0 (no rate limiting) |
Members
-
agents :Agents
-
An instance of Agents using a shared ESIAgent configured based on the API's initialization options.
Type:
-
alliances :Alliances
-
An instance of Alliances using a shared ESIAgent configured based on the API's initialization options.
Type:
-
bloodlines :Bloodlines
-
An instance of Bloodlines using a shared ESIAgent configured based on the API's initialization options.
Type:
-
characters :Characters
-
An instance of Characters using a shared ESIAgent configured based on the API's initialization options.
Type:
-
constellations :Constellations
-
An instance of Constellations using a shared ESIAgent configured based on the API's initialization options.
Type:
-
corporations :Corporations
-
An instance of Corporations using a shared ESIAgent configured based on the API's initialization options.
Type:
-
dogma :Dogma
-
An instance of Dogma using a shared ESIAgent configured based on the API's initialization options.
Type:
-
factions :Factions
-
An instance of Factions using a shared ESIAgent configured based on the API's initialization options.
Type:
-
freeports :Freeports
-
An instance of Freeports using a shared ESIAgent configured based on the API's initialization options.
Type:
-
graphics :Graphics
-
An instance of Graphics using a shared ESIAgent configured based on the API's initialization options.
Type:
-
incursions :Incursions
-
An instance of Incursions using a shared ESIAgent configured based on the API's initialization options.
Type:
-
industry :Industry
-
An instance of Industry using a shared ESIAgent configured based on the API's initialization options.
Type:
-
insurance :Insurance
-
An instance of Insurance using a shared ESIAgent configured based on the API's initialization options.
Type:
-
killmail :Killmail
-
An instance of Killmail using a shared ESIAgent configured based on the API's initialization options.
Type:
-
moons :Moons
-
An instance of Moons using a shared ESIAgent configured based on the API's initialization options.
Type:
-
opportunities :Opportunities
-
An instance of Opportunities using a shared ESIAgent configured based on the API's initialization options.
Type:
-
pi :PlanetaryInteraction
-
An instance of PlanetaryInteraction using a shared ESIAgent configured based on the API's initialization options.
Type:
-
planets :Planets
-
An instance of Planets using a shared ESIAgent configured based on the API's initialization options.
Type:
-
races :Races
-
An instance of Races using a shared ESIAgent configured based on the API's initialization options.
Type:
-
regions :Regions
-
An instance of Regions using a shared ESIAgent configured based on the API's initialization options.
Type:
-
search :Search
-
An instance of Search using a shared ESIAgent configured based on the API's initialization options. This Search instance is configured to use all categories and is not tied to a character.
Type:
-
solarSystems :SolarSystems
-
An instance of SolarSystems using a shared ESIAgent configured based on the API's initialization options.
Type:
-
sovereignty :Sovereignty
-
An instance of Sovereignty using a shared ESIAgent configured based on the API's initialization options.
Type:
-
stargates :Stargates
-
An instance of Stargates using a shared ESIAgent configured based on the API's initialization options.
Type:
-
stations :Stations
-
An instance of Stations using a shared ESIAgent configured based on the API's initialization options.
Type:
-
types :Types
-
An instance of Types using a shared ESIAgent configured based on the API's initialization options.
Type:
-
wars :Wars
-
An instance of Wars using a shared ESIAgent configured based on the API's initialization options.
Type:
-
wormholes :Wormholes
-
An instance of Wormholes using a shared ESIAgent configured based on the API's initialization options.
Type:
Methods
-
names(ids)
-
Resolve a set of IDs to names and categories. Supported ID's for resolving are: Characters, Corporations, Alliances, Stations, Solar Systems, Constellations, Regions, Types.
This makes an HTTP POST request to
/universe/names/
. The route version isv2
.The array length of
ids
must be between1
and1000
.On success, this resolves to list of id/name associations for a set of ID's. ID's that cannot be resolved are not returned. An example result is:
[ { "category": "character", "id": 95465499, "name": "CCP Bartender" } ]
If ids is longer than the reported maximum length for ESI, the array will be split into smaller chunks and multiple requests will be made and then concatenated back together.
Parameters:
Name Type Description ids
Array.<Number> The ids to resolve.
Returns:
A Promise that resolves to the parsed JSON of the response.
- Type
- Promise.<Array.<Object>>
-
status()
-
EVE Server status. This route is cached for up to 30 seconds.
This makes an HTTP GET request to
/status/
. The route version isv1
.On success, this resolves to server status. An example result is:
{ "players": 12345, "server_version": "1132976", "start_time": "2017-01-02T12:34:56Z", "vip": false }
Returns:
A Promise that resolves to the parsed JSON of the response.
- Type
- Promise.<Object>