earthmc
TypeScript icon, indicating that this package has built-in type declarations

8.3.4 • Public • Published

An unofficial wrapper library for interacting with the EarthMC Dynmap API.
This package is part of the EarthMC Toolkit and provides extensive info on people, places and more.

Install

pnpm add earthmc

Basic Usage

View the full documentation here.

Node

import { Aurora } from 'earthmc' // ESM
const { Aurora } = require('earthmc') // CJS

const towns = await Aurora.Towns.all().catch(console.error)
console.log(towns.length)

Browser

<button onclick="townAmount()">Show town amount</button>

<script type="module" src="https://unpkg.com/earthmc@latest/dist/main.js"></script>
<script>
import { Aurora } from 'earthmc'

window.townAmount = async function() {
  try {
    const towns = await Aurora.Towns.all()
    alert(towns.length)
  }
  catch(e) {
    console.error(e)
  }
}
</script>

Package Sidebar

Install

npm i earthmc

Weekly Downloads

9

Version

8.3.4

License

ISC

Unpacked Size

236 kB

Total Files

78

Last publish

Collaborators

  • owen77stubbs