Skip to content

Commit 1dc095e

Browse files
authored
Merge pull request #1 from Shockbyte/v2.3.0
v2.3.0
2 parents 5fac5fc + f950b6b commit 1dc095e

3 files changed

Lines changed: 66 additions & 14 deletions

File tree

examples.js

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,14 @@ async function examples() {
2222
console.log(e);
2323
}
2424

25-
try {
26-
const listServersByConnection = await api.listServersByConnection({ connection_id: '1' });
27-
console.log(listServersByConnection);
28-
// {
29-
// success: true,
30-
// errors: [],
31-
// data: { Servers: { '1': 'test', '2': 'Minecraft Server' } }
32-
// }
33-
} catch (e) {
34-
console.log(e);
35-
}
25+
api.listServersByConnection({ connection_id: '1' })
26+
.then((data) => console.log(data))
27+
.catch((err) => console.error(err));
28+
// {
29+
// success: true,
30+
// errors: [],
31+
// data: { Servers: { '1': 'test', '2': 'Minecraft Server' } }
32+
// }
3633
}
3734

3835
examples()

methods.json

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,17 @@
7979
"removeUserApiKey": [
8080
"user_id"
8181
],
82+
"getOwnApiKey": [
83+
"password",
84+
{
85+
"name": "generate",
86+
"default": 0
87+
},
88+
{
89+
"name": "gauth_code",
90+
"default": ""
91+
}
92+
],
8293
"listPlayers": [
8394
"server_id"
8495
],
@@ -109,7 +120,11 @@
109120
],
110121
"createPlayer": [
111122
"server_id",
112-
"name"
123+
"name",
124+
{
125+
"name": "op_command",
126+
"default": 0
127+
}
113128
],
114129
"deletePlayer": [
115130
"id"
@@ -228,6 +243,32 @@
228243
"default": 0
229244
}
230245
],
246+
"createAndConfigureServer": [
247+
{
248+
"name": "field",
249+
"type": "array"
250+
},
251+
{
252+
"name": "value",
253+
"type": "array"
254+
},
255+
{
256+
"name": "configField",
257+
"type": "array"
258+
},
259+
{
260+
"name": "configValue",
261+
"type": "array"
262+
},
263+
{
264+
"name": "no_commands",
265+
"default": 0
266+
},
267+
{
268+
"name": "no_setup_script",
269+
"default": 0
270+
}
271+
],
231272
"suspendServer": [
232273
"id",
233274
{
@@ -345,6 +386,20 @@
345386
"server_id",
346387
"daemon_id"
347388
],
389+
"listServerPorts": [
390+
"id"
391+
],
392+
"addServerPort": [
393+
"id",
394+
{
395+
"name": "port",
396+
"default": 0
397+
}
398+
],
399+
"removeServerPort": [
400+
"id",
401+
"port"
402+
],
348403
"listConnections": [],
349404
"findConnections": [
350405
{

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "multicraft-api-node",
3-
"version": "2.2.1",
4-
"description": "API Version 2.2.1",
3+
"version": "2.3.0",
4+
"description": "API Version 2.3.0",
55
"main": "index.js",
66
"homepage": "https://github.com/Shockbyte/multicraft-api-node",
77
"repository": {

0 commit comments

Comments
 (0)