1.1.3 • Published 4 years ago
chatwind.js v1.1.3
chatwind.js
Usage
Add the package
To start, you will need to add the package. To do that, simply run npm i chatwind.js
. In your code, add the following:
const chatwind = require("chatwind.js");
Now you can use any of the functions below! All of the function return a Promise (just an FYI).
Getting a user's information
chatwind.user("USERNAME").then(result => console.log(result));
The code above should return a 200 OK message. (JSON)
Check if a custom meeting code is valid
chatwind.customcode("CODE").then(result => console.log(result));
The code above should return a 200 OK message. (JSON)
Get the statistics for Chatwind
chatwind.stats().then(result => console.log(result));
The code above should return a 200 OK message. (JSON)
Unmentioned feature
If this package does not have a function for a certain API endpoint, we have a function that lets you easily interact with any endpoint!
chatwind.api("PATH", "METHOD").then(result => console.log(result));
This will return a JSON from the endpoint specified.
Note: "PATH" is the endpoint (e.g users/milanm), and "METHOD" is the HTTP method (e.g POST).