MC-API / Issues

Public issue tracker for mc-api.net
https://mc-api.net
2 stars 0 forks source link

Add properties to the UUID to Name API #33

Closed KareemMAX closed 8 years ago

KareemMAX commented 8 years ago

I'm working in a program that show the skin of player and modify it so I need to know the model of the player (Alex or Steve), so I used mcapi.ca's Name API which has alots of problems So I wish if you add the properties field which is exist in Mojang API Looks like this with Mojang API

{
    "id":"4566e69fc90748ee8d71d7ba5aa00d20"
    ,"name":"Thinkofdeath","properties":[
        {"name":"textures",
                "value":"eyJ0aW1lc3RhbXAiOjE0NTg3NjI5MTk0NzMsInByb2ZpbGVJZCI6IjQ1NjZlNjlmYzkwNzQ4ZWU4ZDcxZDdiYTVhYTAwZDIwIiwicHJvZmlsZU5hbWUiOiJUaGlua29mZGVhdGgiLCJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMTNlODFiOWUxOWFiMWVmMTdhOTBjMGFhNGUxMDg1ZmMxM2NkNDdjZWQ1YTdhMWE0OTI4MDNiMzU2MWU0YTE1YiJ9LCJDQVBFIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMjJiOWM1ZWE3NjNjODZmYzVjYWVhMzNkODJiMGZhNjVhN2MyMjhmZDMyMWJhNTQ3NjZlYTk1YTNkMGI5NzkzIn19fQ=="
       }
    ]
}

In MCAPI.ca the properties decoded and look like this

{
    "uuid": "da6ab8ee71ad46d29529cf95df6902b9",
    "uuid_formatted": "da6ab8ee-71ad-46d2-9529-cf95df6902b9",
    "name": "Yive",
    "properties": {
        "name": "textures",
        "value": "eyJ0aW1lc3RhbXAiOjE0NDY5MzY0NTA3MDksInByb2ZpbGVJZCI6ImRhNmFiOGVlNzFhZDQ2ZDI5NTI5Y2Y5NWRmNjkwMmI5IiwicHJvZmlsZU5hbWUiOiJZaXZlIiwic2lnbmF0dXJlUmVxdWlyZWQiOnRydWUsInRleHR1cmVzIjp7IlNLSU4iOnsidXJsIjoiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS9kZmNhYjE0M2ExMmUyNTNkNDUyNzM0ZmIyMWVmMjIyNTlkMWQwYTEzN2Q0NjBiNjc2Njg0OTFlOWQyNCJ9fX0=",
        "signature": "ZbP6agDrOxHsf7GrEjdxXmZL530bq74vrZ4YAm9yXYI777I0csEcLeqtXvZU\/wUOX0fDzabhLn8P3L4ebkOX7SYFa5WK+BDrhcXWv0i7BIck4KwazBA32aV7H2SxdaN4V4SNKmAEaWD4q+W1pbI0+8HgYqw2CVBg2\/I4+QC8yUwb8DuKy9pOwLJmbLjMTcgYXOC65ClDLzq\/aYlt8aPVR8QVpiAs599p8Dqe9b6U5EfhI8RdGQZ1W3a8jaQaOmDBlrEOCgZgtlh2Fy4YBdGdhA139gEwZKgR\/BE03u9lKH2fCJAyhLErQrO9\/\/6Bdv8w\/fQIlh9sdMrdS1O4aua40sZY+ebxsir2mtEoQREvhiGgqbCaPvfuvhSntLbF20\/Vl2fSg\/ADBgQJOZ8jaTo1KqVe7TZ+4ZB+RLYRhm9fdDheJQjr\/4Qm93gJj+DpZX4Tye3kZAA9HBiyaHw4BHfN6\/YePFAeAxmOYuayN19Owcl8jId5I4ancrAS5MS\/riZXN5jADeSveDe0xX5AhSKeK3KbeVuaT+HpCiInisTj791XtcAtGSshMnM0A86bxb2xQRypSeiA6kLPd2\/NXrgLYVJQl+Qfx0FewBe+CADbxd6Wts6D6Nq+cu4QNhbSIm7Y0KP7Zjujywl5YVYNCtm6I\/UWOyQvyC8HnXK7tqrKkCo="
    },
    "properties_decoded": {
        "timestamp": 1446936450709,
        "profileId": "da6ab8ee71ad46d29529cf95df6902b9",
        "profileName": "Yive",
        "textures": {
            "SKIN": {
                "url": "http:\/\/textures.minecraft.net\/texture\/dfcab143a12e253d452734fb21ef22259d1d0a137d460b67668491e9d24"
            },
            "CAPE": {
                "url": null
            }
        }
    }
}

But in the "SKIN" section there is also "metadata" : {"model": "slim"} if the skin was with alex model which I use, It's exist in the "properties" but not in "properties decoded" in MCAPI.ca so I wish you add this as soon as you can with the metadata because I need it

Note : I have used the examples because the MCAPI.ca Name API is down

nathantowell commented 8 years ago

Hey @KareemMAX. I could do this today if @njb-said can give me access to the private backend repo.

KareemMAX commented 8 years ago

Ok @ImNatho, Please try to finish it today because I want to recover this problem quickly.

nathantowell commented 8 years ago

So you just want a decoded skin section added to the api like mcapi.ca correct?

KareemMAX commented 8 years ago

Yes, with metadata if the skin model is Alex

njb-said commented 8 years ago

@KareemMAX This might sound like a stupid question but is it not possible for you to just decode the base64 on your end? (I'm not against us doing it, just wondering what your use case is :+1: )

KareemMAX commented 8 years ago

@njb-said My reason to submit this issue is just to add the "properties" field not "properties_decoded" but @ImNatho maybe thought that I was just want "properties_decoded" only :+1:

KareemMAX commented 8 years ago

I was actullay decoding the properties field when I was using MCAPI.ca because of the missed field

nathantowell commented 8 years ago

I can do either, but for now I might just do "properties" and leave it encoded so that it can be used for more use-cases

KareemMAX commented 8 years ago

Ok no problem just tell me when you are done this

nathantowell commented 8 years ago

Added to next major update. Sorry it took almost 2 months.