📨 mojang-redis 📨
A Go MicroService for the Mojang API, to serve responses faster and create REDIS caches for each request.
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
GET http://127.0.0.1:8080/users/profiles/minecraft/notch
Response
{
"name": "Notch",
"id": "069a79f444e94726a5befca90e38aaf5"
}
POST http://127.0.0.1:8080/profiles/minecraft
Body payload
[
"NeT32",
"notch",
"nonExistingPlayer"
]
Response
[
{
"id": "c5870df744e9495f928a0e3e8703a03e",
"name": "net32"
},
{
"id": "069a79f444e94726a5befca90e38aaf5",
"name": "Notch"
}
]
GET http://127.0.0.1:8080/session/minecraft/profile/069a79f444e94726a5befca90e38aaf5
Response
{
"id": "069a79f444e94726a5befca90e38aaf5",
"name": "Notch",
"properties": [
{
"name": "textures",
"value": "ewogICJ0aW1lc3RhbXAiIDogMTY0OTgxMjMzNzk2NywKICAicHJvZmlsZUlkIiA6ICIwNjlhNzlmNDQ0ZTk0NzI2YTViZWZjYTkwZTM4YWFmNSIsCiAgInByb2ZpbGVOYW1lIiA6ICJOb3RjaCIsCiAgInRleHR1cmVzIiA6IHsKICAgICJTS0lOIiA6IHsKICAgICAgInVybCIgOiAiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS8yOTIwMDlhNDkyNWI1OGYwMmM3N2RhZGMzZWNlZjA3ZWE0Yzc0NzJmNjRlMGZkYzMyY2U1NTIyNDg5MzYyNjgwIgogICAgfQogIH0KfQ=="
}
]
}