2.4.0 • Published 4 years ago

multicraft-api-node v2.4.0

Weekly downloads
4
License
ISC
Repository
github
Last release
4 years ago

multicraft-api-node

A Node.js wrapper for the Multicraft API.

Example use

npm i multicraft-api-node

const MulticraftAPI = require('multicraft-api-node');

const api = new MulticraftAPI({
    url: "https://localhost/api.php",
    user: "username",
    key: "apiKey"
});

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' } }
// }

To view more examples of use, check out the examples.js file.

Manual Updating

The methods.json file automatically generates the functions. To update this file:

  1. Download the latest MulticraftAPI.php file (from the Multicraft panel files)
  2. Convert the array to a JSON object.
  3. Paste into the methods.json file (and test that it works).
2.4.0

4 years ago

2.3.0

4 years ago

2.2.2

4 years ago

2.2.1

4 years ago