0.0.5 • Published 7 months ago

coralmc v0.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
7 months ago

CoralMC

About

A Node.js/Bun module that allows you to interact with the CoralMC API.

Warning CoralMC's API is still in alpha and isn't documented. In the future an access token is going to be required. At the current state, it isn't recommended for production usage as it could stop working at any point.

Installation

# Node
npm i coralmc
yarn add coralmc
pnpm add coralmc

# Bun
bun add coralmc

Example usage

Get basic player info:

const coralmc = require("coralmc");

const playerInfo = await coralmc.getPlayerInfo("Feryzz").catch((err) => {
  console.error(`Error: ${err}`);
});

if (playerInfo) {
  console.log(playerInfo);
} else console.log("Player not found!");

Get player stats:

const coralmc = require("coralmc");

const playerStats = await coralmc.getPlayerStats("Feryzz").catch((err) => {
  console.error(`Error: ${err}`);
});

if (playerStats) {
  console.log(playerStats.bedwars);
  console.log(playerStats.kitpvp);
} else console.log("Player not found!");
0.0.5

7 months ago

0.0.4

7 months ago

0.0.3

7 months ago

0.0.2

8 months ago

0.0.1

8 months ago