Skip to content

Commit

Permalink
feat: v2.1.0! 🎉
Browse files Browse the repository at this point in the history
  • Loading branch information
devnote-dev committed Oct 8, 2022
1 parent ad60660 commit c472cbc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<h1 align="center">PteroJS</h1>
<h3 align="center"><strong>A verbose API library for Pterodactyl</strong></h3>
<p align="center"><a href="https://discord.com/invite/dwcfTjgn7S" type="_blank"><img src="https://img.shields.io/badge/discord-invite-5865f2?style=for-the-badge&logo=discord&logoColor=white"></a> <img src="https://img.shields.io/badge/version-2.0.1-3572A5?style=for-the-badge"> <img src="https://img.shields.io/github/issues/PteroPackages/PteroJS.svg?style=for-the-badge"> <a href="https://pteropackages.github.io/PteroJS/" type="_blank"><img src="https://img.shields.io/badge/docs-typedoc-e67e22?style=for-the-badge"></a></p>
<p align="center"><a href="https://discord.com/invite/dwcfTjgn7S" type="_blank"><img src="https://img.shields.io/badge/discord-invite-5865f2?style=for-the-badge&logo=discord&logoColor=white"></a> <img src="https://img.shields.io/badge/version-2.1.0-3572A5?style=for-the-badge"> <img src="https://img.shields.io/github/issues/PteroPackages/PteroJS.svg?style=for-the-badge"> <a href="https://pteropackages.github.io/PteroJS/" type="_blank"><img src="https://img.shields.io/badge/docs-typedoc-e67e22?style=for-the-badge"></a></p>

## About
PteroJS is a verbose API library for the [Pterodactyl Game Panel](https://pterodactyl.io) designed to give developers full access and control over the API without having to compromise on code quality or efficiency.
Expand All @@ -21,12 +21,15 @@ import pterojs from 'https://cdn.skypack.dev/@devnote-dev/pterojs';
Please join the [support server](https://discord.com/invite/dwcfTjgn7S) if you experience any issues with installing the package.

## Compatibility
Note that you can use older versions of PteroJS with newer versions of Pterodactyl and Wings, but they will not be up-to-date with the latest features and fixes.

PteroJS | Panel | Wings
--------|-------|------
❌ | `<= 0.7` | `<= 1.5`
`1.3.0` | `1.6.5 >= 1.7.0` | `~1.6.0`
`1.4.2` | `1.7.0 >= 1.8.1` | `~1.6.0`
`2.0.1` | `^1.9.0` | `^1.7.0`
`2.1.0` | `^1.10.0` | `^1.7.0`

## Setting Up
PteroJS uses separate classes for the client and application sides of the Pterodactyl API.
Expand All @@ -39,22 +42,18 @@ const { PteroApp } = require('@devnote-dev/pterojs');
const app = new PteroApp('your.domain.name', 'pterodactyl_api_key');

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

### Using the client API
```js
const { PteroClient } = require('@devnote-dev/pterojs');

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

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

// Listening to events
shard.on('statusUpdate', status => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@devnote-dev/pterojs",
"version": "2.0.1",
"version": "2.1.0",
"description": "A verbose API library for Pterodactyl",
"author": "Devonte <https://github.com/devnote-dev>",
"contributors": [
Expand Down

0 comments on commit c472cbc

Please sign in to comment.