Skip to content

Commit

Permalink
Merge pull request #1 from Shockbyte/v2.3.0
Browse files Browse the repository at this point in the history
v2.3.0
  • Loading branch information
Switchbladed authored Oct 22, 2020
2 parents 5fac5fc + f950b6b commit 1dc095e
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 14 deletions.
19 changes: 8 additions & 11 deletions examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,14 @@ async function examples() {
console.log(e);
}

try {
const listServersByConnection = await api.listServersByConnection({ connection_id: '1' });
console.log(listServersByConnection);
// {
// success: true,
// errors: [],
// data: { Servers: { '1': 'test', '2': 'Minecraft Server' } }
// }
} catch (e) {
console.log(e);
}
api.listServersByConnection({ connection_id: '1' })
.then((data) => console.log(data))
.catch((err) => console.error(err));
// {
// success: true,
// errors: [],
// data: { Servers: { '1': 'test', '2': 'Minecraft Server' } }
// }
}

examples()
57 changes: 56 additions & 1 deletion methods.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,17 @@
"removeUserApiKey": [
"user_id"
],
"getOwnApiKey": [
"password",
{
"name": "generate",
"default": 0
},
{
"name": "gauth_code",
"default": ""
}
],
"listPlayers": [
"server_id"
],
Expand Down Expand Up @@ -109,7 +120,11 @@
],
"createPlayer": [
"server_id",
"name"
"name",
{
"name": "op_command",
"default": 0
}
],
"deletePlayer": [
"id"
Expand Down Expand Up @@ -228,6 +243,32 @@
"default": 0
}
],
"createAndConfigureServer": [
{
"name": "field",
"type": "array"
},
{
"name": "value",
"type": "array"
},
{
"name": "configField",
"type": "array"
},
{
"name": "configValue",
"type": "array"
},
{
"name": "no_commands",
"default": 0
},
{
"name": "no_setup_script",
"default": 0
}
],
"suspendServer": [
"id",
{
Expand Down Expand Up @@ -345,6 +386,20 @@
"server_id",
"daemon_id"
],
"listServerPorts": [
"id"
],
"addServerPort": [
"id",
{
"name": "port",
"default": 0
}
],
"removeServerPort": [
"id",
"port"
],
"listConnections": [],
"findConnections": [
{
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "multicraft-api-node",
"version": "2.2.1",
"description": "API Version 2.2.1",
"version": "2.3.0",
"description": "API Version 2.3.0",
"main": "index.js",
"homepage": "https://github.com/Shockbyte/multicraft-api-node",
"repository": {
Expand Down

0 comments on commit 1dc095e

Please sign in to comment.