getServers
.getServers() allows you to information on servers the user your logged in as has access to.
// Dependencies
const CubedCraft = require('cubed-api');
// Account Details
const username = 'ACCOUNT_USERNAME';
const password = 'ACCOUNT_PASSWORD';
// Logging Into The Account
CubedCraft.login(username, password).then(ses => {
// Getting All Of The User's Servers With Their Session ID
CubedCraft.getServers(ses).then(servers => {
console.log(servers);
})
});Last updated