A simple scraper & wrapper for BlocksMC!
npm i blocksmc
// or
yarn add blocksmc
const { Blocks } = require('blocksmc');
const blocks = new Blocks();
blocks.player('iAbady').then(player => {
console.log(player.games.map(g => `${g.game} ${g.stats.Deaths}`))
console.log(player.rank)
console.log(player.timePlayed)
});
blocks.top('sky-wars').then(leader => {
console.log(leader);
})
player(username) -->
rank: String,
timePlayed: String,
games: [
{
game: String,
stats: {
Points: Number,
Wins: Number,
Played: Number,
Eggs?: Number,
Blocks?: Number,
Kills?: Number,
FireWorks?: Number,
Crates?: Number,
DMs?: Number,
Sponges?: Number,
Beds?: Number,
Rounds?: Number,
Goals?: Number,
}
}
]
top(game) --> Array