mojang-api
mojang-api copied to clipboard
Speed
Wouldn't it be faster to make 1 url just for uuid?
How would it be faster? There is a check if a username or uuid was given, and if username - it first searches for uuid by username and then find anything else
Yeah, an if-else statement is not going to make it slower. See https://github.com/Electroid/mojang-api/blob/master/src/api.coffee#L24.
How would it be faster? There is a check if a username or uuid was given, and if username - it first searches for uuid by username and then find anything else
You have textures and signature in the same link. And it often works slower than Mojang's url.
How would it be faster? There is a check if a username or uuid was given, and if username - it first searches for uuid by username and then find anything else
You have textures and signature in the same link. And it often works slower than Mojang's url.
This is the wrong API for you then. This API is for getting all the the information in one request rather than multiple. It will be slower that way.
How would it be faster? There is a check if a username or uuid was given, and if username - it first searches for uuid by username and then find anything else
You have textures and signature in the same link. And it often works slower than Mojang's url.
This is the wrong API for you then. This API is for getting all the the information in one request rather than multiple. It will be slower that way.
But it has no rate limits right?
I could add some query parameters, or another endpoint to configure what you want/don't want. That should make it faster depending on your exact needs (say, if you don't need textures)
I could add some query parameters, or another endpoint to configure what you want/don't want. That should make it faster depending on your exact needs (say, if you don't need textures)
That's a great idea actually -- the query parameters.
I could add some query parameters, or another endpoint to configure what you want/don't want. That should make it faster depending on your exact needs (say, if you don't need textures)
Sounds cool, your api doesn't have rate limits right? Also could you look into this issue? https://github.com/Electroid/mojang-api/issues/49
I could add some query parameters, or another endpoint to configure what you want/don't want. That should make it faster depending on your exact needs (say, if you don't need textures)
Yea, that would be very useful for me. I'm writing my own implementation of mojang authlib and want to use your API because timings are nice but your API provides too much (sometimes useless) data. I just need textures from username for instance.
I could add some query parameters, or another endpoint to configure what you want/don't want. That should make it faster depending on your exact needs (say, if you don't need textures)
Is mojang/v2/uuid safe to use to just get uuid of premium player? Please check this issue too https://github.com/Electroid/mojang-api/issues/49
You can use: https://api.ashcon.app/mojang/v2/uuid/Notch to just get the UUID.
You can use: https://api.ashcon.app/mojang/v2/uuid/Notch to just get the UUID.
I see it returns normal 404 http response code in my java app, am I right? It returns 404 when player is offline mode, right?