Package Exports
- voxyl-api
- voxyl-api/main/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (voxyl-api) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
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)
})