voxyl-api
v1.2.0
Published
A Voxyl API Client for Node
Downloads
3
Maintainers
Readme
A Voxyl API Client for Node
Installation
npm install --save voxyl-api
Usage
Getting player information
const VoxylAPI = require('voxyl-api')
const client = new VoxylAPI('API-key')
client.getPlayerInfo('name', 'ObamaFootFungus').then((player) => {
console.log(player)
}).catch((err) => {
console.error('Error: ' + err)
})
Getting overall player stats
client.getPlayerOverallStats('name', 'ObamaFootFungus').then((player) => {
console.log(player)
}).catch((err) => {
console.error('Error: ' + err)
})
Getting player game stats
client.getPlayerGameStats('name', 'ObamaFootFungus').then((player) => {
console.log(player)
}).catch((err) => {
console.error('Error: ' + err)
})
Getting info about a guild
client.getGuildInfo('Guild-Tag').then((guild) => {
console.log(guild)
}).catch((err) => {
console.error('Error: ' + err)
})
Getting the members of a guild
client.getGuildMembers('Guild-Tag/ID').then((guild) => {
console.log(guild)
}).catch((err) => {
console.error('Error: ' + err)
})
Getting the top guilds
// number is the amount of guilds
client.getTopGuilds(number).then((guilds) => {
console.log(guilds)
}).catch((err) => {
console.error('Error: ' + err)
})
Getting announcements
client.getAnnouncements().then((announcements) => {
console.log(announcements)
}).catch((err) => {
console.error('Error: ' + err)
})