mojang-redis

command module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2022 License: GPL-3.0 Imports: 1 Imported by: 0

README

📨 mojang-redis 📨

A Go MicroService for the Mojang API, to serve responses faster and create REDIS caches for each request.

FROM 444ms
TO 1ms

Quick start with Docker 🐳

git clone https://github.com/net32/mojang-redis.git
docker-compose up -d

Examples Request 📝

Request are the same of Mojang API

Username to UUID
GET http://127.0.0.1:8080/users/profiles/minecraft/notch
Response
{
	"name": "Notch",
	"id": "069a79f444e94726a5befca90e38aaf5"
}
Usernames to UUIDs
POST http://127.0.0.1:8080/profiles/minecraft
Body payload
[
    "NeT32",
    "notch",
    "nonExistingPlayer"
]
Response
[
	{
		"id": "c5870df744e9495f928a0e3e8703a03e",
		"name": "net32"
	},
	{
		"id": "069a79f444e94726a5befca90e38aaf5",
		"name": "Notch"
	}
]
UUID to Name History
GET http://127.0.0.1:8080/user/profiles/14f19f5050cb44cd9f0bbe906ad59753/names
Response
[
	{
		"name": "HaloIsBae"
	},
	{
		"name": "BilboBeaver",
		"changedToAt": 1450912796000
	},
	{
		"name": "Bar",
		"changedToAt": 1495337426000
	}
]
UUID to Profile and Skin/Cape
GET http://127.0.0.1:8080/session/minecraft/profile/069a79f444e94726a5befca90e38aaf5
Response
{
	"id": "069a79f444e94726a5befca90e38aaf5",
	"name": "Notch",
	"properties": [
		{
			"name": "textures",
			"value": "ewogICJ0aW1lc3RhbXAiIDogMTY0OTgxMjMzNzk2NywKICAicHJvZmlsZUlkIiA6ICIwNjlhNzlmNDQ0ZTk0NzI2YTViZWZjYTkwZTM4YWFmNSIsCiAgInByb2ZpbGVOYW1lIiA6ICJOb3RjaCIsCiAgInRleHR1cmVzIiA6IHsKICAgICJTS0lOIiA6IHsKICAgICAgInVybCIgOiAiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS8yOTIwMDlhNDkyNWI1OGYwMmM3N2RhZGMzZWNlZjA3ZWE0Yzc0NzJmNjRlMGZkYzMyY2U1NTIyNDg5MzYyNjgwIgogICAgfQogIH0KfQ=="
		}
	]
}
Blocked Servers
GET http://127.0.0.1:8080/blockedservers
Response

A line-separated list of all SHA1 hashes.

d7aaeee640a82d97b182d237c46e6fe4c6d55fe3
fc14b4c345af53bd3a8566de92b71186432253cc
c5c03d9bad5c5ad25deb64600b9cd900312d4d74
72fd29f430c91c583bb7216fe673191dc25a7e18

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
debug command
server command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL