rr-apilib
v0.10.2-alpha
Published
Library for interact with RR-API
Downloads
18
Readme
rr-apilib
Install: npm install rr-apilib
Infos
This Library makes much easier the interactions with the project's API. Declare your Client, log in your user and browse the hidden data or make queries by browsing the classes!
Usage Example
Login and upload a new comment on an existing Resource
import { Client, CommentBuilder } from "rr-apilib";
(async () => {
// Declare the client and login the user
const client = new Client();
await client.login("[email protected]", "password");
// Get an existing ressource in cache with id
const resource = client.resources.cache.get("uuid");
console.log(resource);
// Create new Comment
const newComment = new CommentBuilder()
.setComment(":D");
// POST the new comment in API
await ressource.comments.add(newComment);
// Log ressource comments
console.log(ressource.comments);
})();
Links
Contact
- Discord Horziox#0007