new Window(agent, token)
Create a new Window 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
-
contract(contractId)
-
Open the contract window inside the client.
This makes an HTTP POST request to
/ui/openwindow/contract/
. The route version isv1
.On success, this resolves to an empty object.
This function must be used with an SSO token that has the following scopes:
esi-ui.open_window.v1
Parameters:
Name Type Description contractId
Number The contract to open.
Returns:
A Promise that resolves to an empty object.
- Type
- Promise.<Object>
-
info(id)
-
Open the information window for a character, corporation or alliance inside the client.
This makes an HTTP POST request to
/ui/openwindow/information/
. The route version isv1
.On success, this resolves to an empty object.
This function must be used with an SSO token that has the following scopes:
esi-ui.open_window.v1
Parameters:
Name Type Description id
Number The target to open.
Returns:
A Promise that resolves to an empty object.
- Type
- Promise.<Object>
-
market(typeId)
-
Open the market details window for a specific typeID inside the client.
This makes an HTTP POST request to
/ui/openwindow/marketdetails/
. The route version isv1
.On success, this resolves to an empty object.
This function must be used with an SSO token that has the following scopes:
esi-ui.open_window.v1
Parameters:
Name Type Description typeId
Number The item type to open in market window.
Returns:
A Promise that resolves to an empty object.
- Type
- Promise.<Object>
-
newMail(settings)
-
Open the New Mail window, according to settings from the request if applicable.
This makes an HTTP POST request to
/ui/openwindow/newmail/
. The route version isv1
.An example value for
settings
is shown below:{ "body": "body string", "recipients": [ 0 ], "subject": "subject string", "to_corp_or_alliance_id": 0, "to_mailing_list_id": 0 }
On success, this resolves to an empty object.
This function must be used with an SSO token that has the following scopes:
esi-ui.open_window.v1
Parameters:
Name Type Description settings
Object The details of mail to create.
Returns:
A Promise that resolves to an empty object.
- Type
- Promise.<Object>