jspteroapi
Version:
A pterodactyl v1 api using undici
76 lines (48 loc) • 2.3 kB
Markdown
[](https://github.com/Linux123123/JSPteroAPI/blob/main/LICENSE)

[](https://github.com/Linux123123/JSPteroAPI/issues)
[](https://github.com/Linux123123/JSPteroAPI/pulls)
[](https://npmjs.com/package/jspteroapi)
<h3>A simple Pterodactyl API library using undici <sub><i>(written in typescript)</i></sub></h3>
Uses only 2 dependencies:
<ul>
<li><img src="https://img.shields.io/github/package-json/dependency-version/linux123123/jspteroapi/undici"/></li>
<li><img src="https://img.shields.io/github/package-json/dependency-version/linux123123/jspteroapi/ws"/></li>
</ul>
<h5>Install from the command line:</h5>
**Npm**
`npm install jspteroapi`
**Yarn**
`yarn add jspteroapi`
Then include it in your application:
```javascript
const node = require('jspteroapi');
const application = new node.Application('HOST', 'TOKEN'); // for application API
const client = new node.Client('HOST', 'TOKEN'); // for Client API
```
You can use any application funtion you want:
```javascript
application.function(parameters).then((response) => {
// response
});
```
or using async / await
```javascript
const res = await application.function(parameters);
```
<h3><a href="https://jspteroapi.linux123123.com/classes/index.Application.html">Application</a></h3>
<h3><a href="https://jspteroapi.linux123123.com/classes/index.Client.html">Client</a></h3>
**How versions work:**
- Panel major version
- The second number is the function release.
- The third number is the bug fix release.
I am not responsible for any damages that you cause to your servers/nodes by using **this API**.
**Remember: This API can potentially be dangerous with the ability to Delete Servers/Nodes at an instant!**
Created and maintained by [Linux123123](https://github.com/linux123123)