Options
All
  • Public
  • Public/Protected
  • All
Menu

The base class for the Pterodactyl client API. This operates using a Pterodactyl client API key which can be found at <your.domain.name/account/api>.

Warning: Keep your API key private at all times. Exposing this can lead to your accond and servers being corrupted, exposed and/or deleted.

Hierarchy

  • PteroClient

Index

Constructors

Properties

account: Account

The account class for controlling your panel account, including the email, password, API keys and SSH keys.

auth: string

The API key for your Pterodactyl account. This should be kept private at all times.

domain: string

The domain for your Pterodactyl panel. This should be the main URL only (not "/api"). Any additional paths will count as the API path.

options: Record<string, OptionSpec>
deprecated

To be replaced with a better system.

requests: RequestManager
schedules: ScheduleManager

Accessors

  • get ping(): number

Methods

  • addSocketServer(id: string): Shard
  • addSocketServer(...ids: string[]): Shard[]
  • Creates a websocket shard for a specified server.

    Parameters

    • id: string

      The identifier of the server.

    Returns Shard

    The server websocket shard.

  • Creates websocket shards for the specified servers.

    Parameters

    • Rest ...ids: string[]

      The identifiers of the servers.

    Returns Shard[]

    An array of the server websocket shards.

  • connect(): Promise<void>
  • disconnect(): void
  • removeSocketServer(id: string): boolean
  • Removes a server from websocket connections.

    Parameters

    • id: string

      The identifier of the server.

    Returns boolean

    Whether the shard was removed.

Generated using TypeDoc