Skip to main content
Module

x/mojang/test.js

Simple and lightweight Mojang API wrapper.
Latest
File
import { status, uuid, history, names, textures, blocked, statistics } from 'https://deno.land/x/mojang/mod.js' // import the mojang module
console.log(await status()) // returns status of various Mojang servicesconsole.log(await uuid('Notch')) // returns the UUID of the name at the timestamp provided, default is Date.now()console.log(await history('Notch')) // returns all the usernames this user has used in the past and the one they are using currentlyconsole.log(await names(['Notch'])) // must be an array, will return player UUIDs and some extrasconsole.log(await textures('Notch')) // will return the player's username plus any additional information about them (e.g. skins)console.log(await blocked()) // returns a list of SHA1 hashes used to check server addresses against when the client tries to connect
console.log(await statistics(['item_sold_minecraft'])) /* must be an array, gets statistics on the sales of Minecraft
available options are:
item_sold_minecraftprepaid_card_redeemed_minecraftitem_sold_cobaltitem_sold_scrollsprepaid_card_redeemed_cobaltitem_sold_dungeons
*/