Class: OpportunityTask

OpportunityTask

An api adapter that provides functions for accessing a particular opportunity task, specified by id via functions in the opportunity ESI endpoints.

You should not usually instantiate this directly as its constructor requires an internal api instance.


new OpportunityTask(agent, taskId)

Create a new OpportunityTask identified as taskId.

Parameters:
Name Type Description
agent ESIAgent

The ESI agent used to make web requests

taskId Number

The task id used in all requests

Methods


info()

Return information of an opportunities task. This route expires daily at 11:05.

This makes an HTTP GET request to /opportunities/tasks/{task_id}/. The route version is v1.

On success, this resolves to details of an opportunities task. An example result is:

{
  "description": "To use station services...",
  "name": "Dock in the station",
  "notification": "Completed:<br>Docked in a station!",
  "task_id": 10
}
Returns:

A Promise that resolves to the parsed JSON of the response.

Type
Promise.<Object>