https://github.com/often/mojang
Simple and lightweight Mojang API wrapper.
https://github.com/often/mojang
Last synced: 3 months ago
JSON representation
Simple and lightweight Mojang API wrapper.
- Host: GitHub
- URL: https://github.com/often/mojang
- Owner: often
- License: mit
- Created: 2020-06-06T02:16:49.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-21T08:38:11.000Z (over 2 years ago)
- Last Synced: 2025-10-20T17:38:29.947Z (8 months ago)
- Language: JavaScript
- Size: 8.79 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mojang
Simple and lightweight Mojang API wrapper.
## Usage
```js
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 services
console.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 currently
console.log(await names(['Notch'])) // must be an array, will return player UUIDs and some extras
console.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_minecraft
prepaid_card_redeemed_minecraft
item_sold_cobalt
item_sold_scrolls
prepaid_card_redeemed_cobalt
item_sold_dungeons
*/
```
## Full API documentation
https://wiki.vg/Mojang_API
# Note
This is not affiliated with Mojang or Microsoft and the services they provide.