Question on offline UUIDs
#6
The problem currently with cMojangAPI is, that it blocks the server. There is a open issue on github.
For now I think cUrlClient could be used. The requests are done asynchronous and this won't block the server.
cUrlClient:Get("https://api.mojang.com/users/profiles/minecraft/<username>",
 function (a_Body, a_Data)
 if (a_Body) then
 -- Response received correctly, a_Body contains the entire response body,
 -- a_Data is a dictionary-table of the response\'s HTTP headers
 local tbUUIDName = cJson:Parse(a_Body)
 LOG(tbUUIDName.id)
 LOG(tbUUIDName.name)
 else
 -- There was an error, a_Data is the error message string
 LOG(a_Data)
 end
 end
)

LOG("Request sent.")

Result for my username:
4fd9f50b6b6143f7a99b8b5be71b52c3
Seadragon91

Source:
http://wiki.vg/Mojang_API#Username_-.3E_UUID_at_time
https://api.cuberite.org/cUrlClient.html
Reply
Thanks given by:


Messages In This Thread
Question on offline UUIDs - by Zee1234 - 03-22-2017, 04:35 AM
RE: Question on offline UUIDs - by xoft - 03-22-2017, 06:45 PM
RE: Question on offline UUIDs - by Zee1234 - 03-23-2017, 05:53 AM
RE: Question on offline UUIDs - by Zee1234 - 03-28-2017, 01:19 AM
RE: Question on offline UUIDs - by NiLSPACE - 03-28-2017, 01:46 AM
RE: Question on offline UUIDs - by Seadragon91 - 03-28-2017, 02:30 AM
RE: Question on offline UUIDs - by xoft - 03-28-2017, 07:47 AM



Users browsing this thread: 1 Guest(s)