Skip to main content
Module

x/ptereno/lib/models/Application.ts>default

An efficient and fully compliant Pterodactyl API wrapper.
Latest
class default
import { default } from "https://deno.land/x/ptereno@v1.0.1/lib/models/Application.ts";

Constructors

new
default(endpoint: string, api_token: string)

Represents a Pterodactyl application object, used for automating application requests.

Methods

createAllocation(node: number, options: NewAllocationOptions)

Creates a new allocation.

If more than one port is provided, multiple allocations will be created.

createDatabase(id: number, unnamed 1: NewDatabaseOptions)

Creates a new server database.

Creates a new location.

Creates a new node.

Creates a new server.

Creates a new user.

deleteAllocation(node: number, id: number)

Deletes an allocation.

deleteDatabase(server: number, id: number)

Deletes a server database.

deleteLocation(id: number)

Deletes a specific location.

deleteNode(id: number)

Deletes a node.

deleteServer(id: number)

Safely deletes a server.

deleteUser(id: number)

Deletes a user.

forceDeleteServer(id: number)

ForcefullY deletes a server.

This method may leave dangling files if an error is encountered.

getAllocations(node: number, params?: AllocationParameters)

Retrieves a list of node allocations.

getDatabase(
server: number,
id: number,
)

Retrieves a specific server database.

getDatabases(server: number, params?: DatabaseParameters)

Retrieves a list of server databases.

getEgg(
nest: number,
id: number,
params?: EggParameters,
)

Retrieves information for a given egg.

getEggs(nest: number, params?: EggParameters)

Retrieves a list of eggs.

getExternalServer(id: string, params?: ServerParameters)

Retrieves information for a given server by external id.

getExternalUser(externalID: string, params?: UserParameters)

Retrieves a user based on an external id.

getLocation(id: number, params?: LocationParameters)

Retrieves details for a specific location.

Retrieves a list of locations.

getNest(id: number, params?: NestParameters)

Retrieves information for a given nest.

Retrieves a list of nests.

getNode(id: number, params?: NodeParameters)

Retrieves information about a node.

Retrieves a specific node configuration.

Determines which nodes can be used to allocate a given amount of resources.

Retrieves a list of nodes.

getServer(id: number, params?: ServerParameters)

Retrieves information for a given server.

Retrieves a list of servers.

getUser(id: number, params?: UserParameters)

Retrieves a user.

Retrieves a list of users.

reinstallServer(id: number)

Triggers a server to reinstall.

WARNING: This can potentially delete preexisting server files, use this method with caution.

rotateDatabasePWD(server: number, id: number)

Resets the password on a specific server database.

suspendServer(id: number)

Suspends a server.

unsuspendServer(id: number)

Unsuspends a server.

Updates a specific location.

updateNode(id: number, unnamed 1: NewNodeOptions)

Updates a node.

Updates build information for a specific server.

Updates details for a specific server.

Updates startup configuration for a specific server.

updateUser(id: number, unnamed 1: UpdateUserOptions)

Updates a user.