Class: Event

Event

An api adapter that provides functions for accessing various details for a specific event specified by id via functions in the calendar ESI endpoints.

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


new Event(calendar, eventId)

Create a new Event represented as eventId from the given calendar.

Parameters:
Name Type Description
calendar Calendar

The calendar owning the event

eventId Number

The event id that is used for all requests

Methods


accept()

Set your response status to an event.

This makes an HTTP PUT request to /characters/{character_id}/calendar/{event_id}/. The route version is v3.

This function invokes the route with response set to {"response":"accepted"}.

On success, this resolves to an empty object.

This function must be used with an SSO token that has the following scopes:

  • esi-calendar.respond_calendar_events.v1
Returns:

A Promise that resolves to an empty object.

Type
Promise.<Object>

decline()

Set your response status to an event.

This makes an HTTP PUT request to /characters/{character_id}/calendar/{event_id}/. The route version is v3.

This function invokes the route with response set to {"response":"declined"}.

On success, this resolves to an empty object.

This function must be used with an SSO token that has the following scopes:

  • esi-calendar.respond_calendar_events.v1
Returns:

A Promise that resolves to an empty object.

Type
Promise.<Object>

info()

Get all the information for a specific event. This route is cached for up to 5 seconds.

This makes an HTTP GET request to /characters/{character_id}/calendar/{event_id}/. The route version is v3.

On success, this resolves to full details of a specific event. An example result is:

{
  "date": "2016-06-26T21:00:00Z",
  "duration": 60,
  "event_id": 1386435,
  "importance": 1,
  "owner_id": 1,
  "owner_name": "EVE System",
  "owner_type": "eve_server",
  "response": "Undecided",
  "text": "o7: The EVE Online Show features latest developer news, fast paced action, community overviews and a lot more with CCP Guard and CCP Mimic. Join the thrilling o7 live broadcast at 20:00 EVE time (=UTC) on <a href=\"http://www.twitch.tv/ccp\">EVE TV</a>. Don't miss it!",
  "title": "o7 The EVE Online Show"
}

This function must be used with an SSO token that has the following scopes:

  • esi-calendar.read_calendar_events.v1
Returns:

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

Type
Promise.<Object>

tentative()

Set your response status to an event.

This makes an HTTP PUT request to /characters/{character_id}/calendar/{event_id}/. The route version is v3.

This function invokes the route with response set to {"response":"tentative"}.

On success, this resolves to an empty object.

This function must be used with an SSO token that has the following scopes:

  • esi-calendar.respond_calendar_events.v1
Returns:

A Promise that resolves to an empty object.

Type
Promise.<Object>