@nirdeshytog/pterodactyl-api
v1.0.3
Published
A easy package to interact with Pterodactyl API
Downloads
40
Maintainers
Readme
Pterodacty API
NodeJS library to interact with Pterodactyl API
Install
You can install this package usingnpm install --save @nirdeshytog/pterodactyl-api
Usage
const PterodactylAPI = require("@nirdeshytog/pterodactyl-api");
const pterodactyl = new PterodactylAPI("https://yourpanelurl.com", "your-api-key")
pterodactyl.init().then(() => {
pterodactyl.getServer(1).then(console.log).catch(console.error)
})
or
const PterodactylAPI = require("@nirdeshytog/pterodactyl-api");
(async () => {
const pterodactyl = new PterodactylAPI("https://yourpanelurl.com", "your-api-key")
await pterodactyl.init()
try {
const serverData = await pterodactyl.getServer(1)
console.log(serverData)
} catch (error) {
console.error(error)
}
})()
If you don't find what you need, don't worry. New methods will be added in future..