luckperms-rest

1.0.11 • Public • Published

Luckperms Rest Client

Node.JS client for the Luckperms rest-api project.

Installing

Using NPM:

$ npm install --save luckperms-rest

Using yarn:

$ yarn add luckperms-rest

Example

const { LuckpermsClient } = require("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.

Readme

Keywords

none

Package Sidebar

Install

npm i luckperms-rest

Weekly Downloads

7

Version

1.0.11

License

MIT

Unpacked Size

2.04 MB

Total Files

137

Last publish

Collaborators

  • codingjwilliams