mirror of
https://github.com/elyby/chrly.git
synced 2025-05-31 14:11:51 +05:30
#1: Improve uuidToTextures method, organize tests
This commit is contained in:
@@ -55,8 +55,13 @@ func UsernamesToUuids(usernames []string) ([]*ProfileInfo, error) {
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func UuidToTextures(uuid string) (*SignedTexturesResponse, error) {
|
||||
request, err := http.NewRequest("GET", "https://sessionserver.mojang.com/session/minecraft/profile/"+uuid, nil)
|
||||
func UuidToTextures(uuid string, signed bool) (*SignedTexturesResponse, error) {
|
||||
url := "https://sessionserver.mojang.com/session/minecraft/profile/" + uuid
|
||||
if signed {
|
||||
url += "?unsigned=false"
|
||||
}
|
||||
|
||||
request, err := http.NewRequest("GET", url, nil)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user