Class: Bookmarks

Bookmarks

An api adapter over the end points handling a character's bookmarks via functions in the bookmarks ESI endpoints. You should not usually instantiate this directly as its constructor requires an internal api instance.

This is a function class so instances of Bookmarks are functions and can be invoked directly, besides accessing its members. Its default function action is equivalent to all.


new Bookmarks(agent, characterId, token)

Create a new Bookmarks function using the given agent, for the character described by characterId with SSO access from token.

Parameters:
Name Type Description
agent ESIAgent

The ESI agent

characterId Number

The character id whose calendar is accessed

token String

The SSO access token for the character

Methods


all()

List your character's personal bookmarks. This route is cached for up to 3600 seconds.

This makes an HTTP GET request to /characters/{character_id}/bookmarks/. The route version is v1.

On success, this resolves to a list of bookmarks. An example result is:

[
  {
    "bookmark_id": 32,
    "create_date": "2016-08-09T11:57:47Z",
    "creator_id": 90000001,
    "folder_id": 5,
    "memo": "aoeu ( Citadel )",
    "note": "",
    "owner_id": 90000001,
    "target": {
      "coordinates": {
        "x": 0,
        "y": 0,
        "z": 0
      },
      "item": {
        "item_id": 1000000012668,
        "type_id": 35832
      },
      "location_id": 30000005
    }
  }
]

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

  • esi-bookmarks.read_character_bookmarks.v1
Returns:

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

Type
Promise.<Array.<Object>>

folders()

List your character's personal bookmark folders. This route is cached for up to 3600 seconds.

This makes an HTTP GET request to /characters/{character_id}/bookmarks/folders/. The route version is v1.

On success, this resolves to list of bookmark folders. An example result is:

[
  {
    "folder_id": 5,
    "name": "Icecream",
    "owner_id": 90000001
  }
]

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

  • esi-bookmarks.read_character_bookmarks.v1
Returns:

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

Type
Promise.<Array.<Object>>