Skip to content

Commit dc2d4fc

Browse files
committed
Typescript, more methods, all work!
1 parent 7b4cd55 commit dc2d4fc

File tree

213 files changed

+3184
-2160
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

213 files changed

+3184
-2160
lines changed

.gitignore

-5
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ typings/
8080

8181
# Nuxt.js build / generate output
8282
.nuxt
83-
dist
8483

8584
# Gatsby files
8685
.cache/
@@ -102,7 +101,3 @@ dist
102101

103102
# TernJS port file
104103
.tern-port
105-
106-
# Test file
107-
108-
test.js

JSPteroAPI.js

-7
This file was deleted.

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020 Linux123123
3+
Copyright (c) 2021 Linux123123
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+9-16
Original file line numberDiff line numberDiff line change
@@ -17,37 +17,30 @@
1717

1818
<h5>Install via package.json:</h5>
1919

20-
`"@linux123123/jspteroapi": "1.3.5"`
20+
`"@linux123123/jspteroapi": "2.0.0"`
2121

2222
Then include it in your application:
2323

2424
```javascript
2525
const node = require('@linux123123/jspteroapi');
26-
const application = node.Application; // for application API
27-
const client = node.Client; // for Client API
26+
const application = new node.Application('HOST', 'TOKEN'); // for application API
27+
const client = new node.Client('HOST', 'TOKEN'); // for Client API
2828
```
2929

3030
# How to use
3131

32-
To login with application api key use:
32+
You can use any application funtion you want:
3333

3434
```javascript
35-
application.login(HOST, API_KEY, (loggedIn, msg) => {
36-
if (loggedIn == true) {
37-
console.log('Pterodactyl has logged in!');
38-
} else {
39-
console.log(msg);
40-
}
41-
}
42-
);
35+
application.function(parameters).then((response) => {
36+
// response
37+
});
4338
```
4439

45-
And then you can use any application funtion you want:
40+
or using async / await
4641

4742
```javascript
48-
application.function(parameters).then((response) => {
49-
// response
50-
});
43+
const res = await application.function(parameters);
5144
```
5245

5346
# Documentation

application/ApplicationRequest.js

-101
This file was deleted.

application/index.js

-112
This file was deleted.

application/methods/createDatabase.js

-33
This file was deleted.

0 commit comments

Comments
 (0)