@chezzer/luckperms-rest
v1.0.12
Published
API Client for LuckPerms Rest API
Readme
This is a port of luckperms-rest that supports ES6 imports.
Luckperms Rest Client
Node.JS client for the Luckperms rest-api project.
Installing
Using NPM:
$ npm install --save luckperms-restUsing yarn:
$ yarn add luckperms-restExample
import { LuckpermsClient } from "@chezzer/luckperms-rest";
let client = new LuckpermsClient({
url: "http://my-server:8080",
apiKey: "<your API key>",
});
async function main() {
let userList = await client.getUsers();
for (const uuid of userList) {
let user = await client.getUser(uuid);
let flyNodes = user.nodes.filter(
(node) => node.key === "essentials.fly"
);
if (flyNodes.length) {
await client.deleteUserNodes(uuid, flyNodes);
}
}
}
main();Documentation
See the API Documentation.
