Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mcnode

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mcnode - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

2

package.json
{
"name": "mcnode",
"version": "0.1.1",
"version": "0.1.2",
"description": "A Minecraft library to fetch information from Mojang's API",

@@ -5,0 +5,0 @@ "main": "./lib",

Redstone Mc Avatar
==================
A very lightweight script - at only __430 bytes__. You put in a Minecraft username, and it returns the requested user's data, including their __UUID__, current __username__, __skin URL__, and __cape__ (If avalible)...
##Required Modules
- __https__: This is standard in NodeJS. Used for making GET requests to the API.
##Process
This script makes 2 intial HTTP requests:
1. Fetching the UUID from a username.
2. Fetching the JSON data from the retrieved UUID.
Then a callback function is triggered, with the data returned as argument. Here is an example of what this might look like:
```
var mcnode = require("./mcnode.js");
mcnode.request("zjamentyler", function(user){
console.log(user.profileId);
// This would log the user's UUID,
});
```
To see what's available, simply log `user`, to see what can be fetched.
A simple NodeJS module to get Minecraft user information from Mojang's API.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc