GithubHelp home page GithubHelp logo

pterojs's Introduction

PteroJS

A verbose API library for Pterodactyl

About

PteroJS is a verbose API library for the Pterodactyl Game Panel designed to give developers full access and control over the API without having to compromise on code quality or efficiency.

Installing

If you are using Node.js (v14.x and above):

npm install @devnote-dev/pterojs
yarn add @devnote-dev/pterojs

Please join the support server if you experience any issues with installing the package.

Compatibility

Pterodactyl API Wings API Support
<=0.7 <=1.5
1.6.5 >= 1.8.0 ^1.6
1.8.1

Setting Up

PteroJS uses separate classes for the client and application sides of the Pterodactyl API.

Using the application API

const { PteroApp } = require('@devnote-dev/pterojs');

// Initialising the application
const app = new PteroApp('your.domain.name', 'pterodactyl_api_key');

// Accessing information
app.servers.fetch('evuk98yu').then(console.log);

Using the client API

const { PteroClient } = require('@devnote-dev/pterojs');

// Initialising the client
const client = new PteroClient(
    'your.domain.name',
    'pterodactyl_api_key',
    { ws: true }
);

// Adding the server to listen for
const shard = client.addSocksetServer('kgujg66h');

// Listening to events
shard.on('statusUpdate', status => {
    console.log(`server ${shard.id} status: ${status}`);
});

// Connecting to the server
shard.connect();

Migrations

Checkout the new migrations guide to PteroJS v2!

Contributing

Please see the todo list or issues section for contributing ideas. New ideas/features are also welcome.

  1. Fork this repo!
  2. Make a branch from main (git branch -b <new-feature>)
  3. Commit your changes (git commit -am "...")
  4. Open a PR here (git push origin <new-feature>)

Contributors

This repository is managed under the MIT license.

© 2021-2022 PteroPackages

pterojs's People

Contributors

devnote-dev avatar chelog avatar liyf4takingls avatar blackdemonfire avatar cainthebest avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.