Skip to content

BundleGroup/luckperms-rest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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-rest

Using yarn:

$ yarn add luckperms-rest

Example

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •