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,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
3835examples ( )
Original file line number Diff line number Diff line change 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 ],
109120 ],
110121 "createPlayer" : [
111122 " server_id" ,
112- " name"
123+ " name" ,
124+ {
125+ "name" : " op_command" ,
126+ "default" : 0
127+ }
113128 ],
114129 "deletePlayer" : [
115130 " id"
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 {
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 {
Original file line number Diff line number Diff line change 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" : {
You can’t perform that action at this time.
0 commit comments