-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.js
More file actions
93 lines (80 loc) · 2.02 KB
/
test.js
File metadata and controls
93 lines (80 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
// @ts-check
import { env } from "node:process";
import { createClient, PrivilegeLevel } from "./dist/index.js";
env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
const client = createClient({
accessToken: env.ACCESS_TOKEN,
});
client.v1
.HealthCheck({
data: {
clientCustomData: "",
},
})
.then((response) => {
console.log("HealthCheck Response:", response);
});
client.v1.VerifyAuthenticationToken().then((response) => {
console.log("VerifyAuthenticationToken Response:", typeof response);
});
client.v1.QueryServerState().then((response) => {
console.log("QueryServerState Response:", response);
});
client.v1.GetServerOptions().then((response) => {
console.log("GetServerOptions Response:", response);
});
client.v1.GetAdvancedGameSettings().then((response) => {
console.log("GetAdvancedGameSettings Response:", response);
});
client.v1
.PasswordlessLogin({
data: {
minimumPrivilegeLevel: PrivilegeLevel.NotAuthenticated,
},
})
.then((response) => {
console.log("PasswordlessLogin Response:", response);
});
client.v1
.PasswordLogin({
data: {
minimumPrivilegeLevel: PrivilegeLevel.NotAuthenticated,
password: "your-password",
},
})
.then((response) => {
console.log("PasswordLogin Response:", response);
});
client.v1
.ApplyAdvancedGameSettings({
data: {
appliedAdvancedGameSettings: {
"FG.GameRules.NoPower": "False",
},
},
})
.then((response) => {
console.log("ApplyAdvancedGameSettings Response:", typeof response);
});
client.v1
.ClaimServer({
data: {
serverName: "your-server",
adminPassword: "your-password",
},
})
.then((response) => {
console.log("ClaimServer Response:", response);
});
client.v1
.RenameServer({
data: {
serverName: "Shinigami-PC localhost",
},
})
.then((response) => {
console.log("RenameServer Response:", typeof response);
});
client.v1.EnumerateSessions().then((response) => {
console.log("EnumerateSessions Response:", response);
});