File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33A Node.js wrapper for the Multicraft API.
44
5- To view examples of use, check out the ` examples.js ` file.
65
7- ### Updating
6+ ### Example use
7+
8+ ` npm i multicraft-api-node `
9+
10+ ```
11+ const MulticraftAPI = require('multicraft-api-node');
12+
13+ const api = new MulticraftAPI({
14+ url: "https://localhost/api.php",
15+ user: "username",
16+ key: "apiKey"
17+ });
18+
19+ api.listServersByConnection({ connection_id: '1' })
20+ .then((data) => console.log(data))
21+ .catch((err) => console.error(err));
22+
23+ // {
24+ // success: true,
25+ // errors: [],
26+ // data: { Servers: { '1': 'test', '2': 'Minecraft Server' } }
27+ // }
28+
29+ ```
30+ To view more examples of use, check out the ` examples.js ` file.
31+
32+ ### Manual Updating
833
934The ` methods.json ` file automatically generates the functions. To update this file:
1035
You can’t perform that action at this time.
0 commit comments