Mojang / AccountsClient

Java client for accessing Mojang's account/profile API
115 stars 37 forks source link

Documentation missing (here it is) #5

Closed jomo closed 10 years ago

jomo commented 10 years ago

Docuemtnation

(Documentation moved to the wiki)

ezfe commented 10 years ago

I'm guessing that 'legacy' is a non migrated account.

jomo commented 10 years ago

That would make sense, cannot test now. It won't return this any longer it seems..

jomo commented 10 years ago

Update: it's only returned when the account is indeed legacy, and when returned it's always true.

ezfe commented 10 years ago

Yup, I'm seeing that

Array
(
    [profiles] => Array
        (
            [0] => Array
                (
                    [id] => 61699b2ed3274a019f1e0ea8c3f06bc6
                    [name] => Dinnerbone
                )

            [1] => Array
                (
                    [id] => c41cfcdd82234262b6630c9298aa91a6
                    [name] => HiGuyMBP
                    [legacy] => 1
                )

        )

    [size] => 2
)
jomo commented 10 years ago

Updated with info about pagination and limits

jomo commented 10 years ago

Updated again, responses seem to be cached on the server

jomo commented 10 years ago

Updated once again, I noticed there's a demo key that seems to be only there when the value is true.. @Dinnerbone / @mollstam mind telling us what this does? :) Are these system-claimed accounts?

jomo commented 10 years ago

And updated again, added uuid -> name.

I have some questions/suggestions:

1) why not use proper JSON, like so:

{ 
  "properties": {
    "textures": "value-goes-here"
  }
}

2) what is the textures signature good for?

3) why in the world is the textures-value of the JSON object a string that holds a base64 encoded JSON? Coldn't you just put the actual object in the key?

4) why does the textures object repeat half the keys we already have? I assume this is because you join data from two databases, but it doesn't seem to be neccessary to return the data twice.

ezfe commented 10 years ago

@jomo I presume that a demo tag represents a demo account (Which yes, do exist).

About the textures, I have no clue why its structured like that.

jomo commented 10 years ago

Ah so demo would be a non-premium / unpaid account? I guess that replaces http://minecraft.net/haspaid.jsp?user={name}

ezfe commented 10 years ago

That would make sense yes

On Apr 11, 2014, at 1:41 AM, jomo notifications@github.com wrote:

Ah so demo would be a non-premium / unpaid account? I guess that replaces http://minecraft.net/haspaid.jsp?user={name}


Von: Ezekiel Elin Gesendet: 11.04.2014 02:04 An: Mojang/AccountsClient Cc: jomo Betreff: Re: [AccountsClient] Documentation missing (here it is) (#5)

@jomo I presume that a demo tag represents a demo account (Which yes, do exist).

About the textures, I have no clue why its structured like that.


Reply to this email directly or view it on GitHub: https://github.com/Mojang/AccountsClient/issues/5#issuecomment-40158641 — Reply to this email directly or view it on GitHub.

jomo commented 10 years ago

Seems to be correct, made a few tests and this was always the case. Thanks.

ezfe commented 10 years ago

Also it would not be the same as haspaid because haspaid doesn't differentiate non existent to demo

Sent from my iPod

On Apr 11, 2014, at 7:31 AM, jomo notifications@github.com wrote:

Seems to be correct, made a few tests and this was always the case. Thanks.

— Reply to this email directly or view it on GitHub.

jomo commented 10 years ago

Yea but the whole thing won't return non-existent accounts anyways ;) (There were other ways to check if a user exists though.)

ezfe commented 10 years ago

Some changes have been made. The request should be to

https://api.mojang.com/profiles/minecraft

with the data being an array, each entry being a string which is the username like so:

["ezekielelin","Dinnerbone"]

jomo commented 10 years ago

Sounds like someone has seen my issue #9 :+1: Will try later today, thanks.

ezfe commented 10 years ago

aye

ezfe commented 10 years ago

Also the data returned is different:

[
    {
        "id":"1e6e79ca12a64a25ae0535cfa0ae576d","name":"ezekielelin"
    },
    {
        "id":"61699b2ed3274a019f1e0ea8c3f06bc6","name":"Dinnerbone"
    }
]
jomo commented 10 years ago

Updated once again, now includes the new API.

jessestricker commented 10 years ago

This is great, you should do a pull request either on Readme.MD, the wiki or gh-pages branch!

jomo commented 10 years ago

Thanks for the suggestion @Cornyfisch, moved documentation to the wiki!