add danger notice about username lookups

- linked to more info further down with detailed description
- removed all mentions of usernames where applicable
This commit is contained in:
jomo 2015-10-15 00:52:50 +02:00
parent 9d46c1c768
commit e844c05dd2
2 changed files with 32 additions and 48 deletions

View File

@ -13,11 +13,6 @@ a {
color: #00B7FF; color: #00B7FF;
} }
a.anchor {
position: relative;
top: -50px;
}
a.forkme { a.forkme {
top: 0; top: 0;
right: 0; right: 0;
@ -47,22 +42,8 @@ a.sponsor {
margin: 5px; margin: 5px;
} }
.container > .navbar-header { .alert {
display: inline-block; font-size: 1rem;
margin: inherit;
}
a.navbar-brand.twitter {
color: #55acee;
}
a.navbar-brand.twitter:before {
content: "";
background: url("/images/twitter.png");
display: inline-block;
height: 16px;
width: 16px;
vertical-align: middle;
} }
mark.green { mark.green {
@ -81,7 +62,7 @@ thead {
margin-left: auto; margin-left: auto;
} }
h1, h2, h3, h4, h5, h6 { h1, h2, h3, h4, h6 {
font-weight: 200; font-weight: 200;
} }

View File

@ -53,13 +53,18 @@
</div> </div>
<div class="container"> <div class="container">
<section id="documentation"> <section id="documentation">
<div class="alert alert-danger" role="alert">
<h5>Usernames are deprecated!</h5>
You should only use usernames for <i>testing</i>.<br>
Updates are slower, some features are not available, and it may <strong>break anytime</strong>!<br>
<i>We strongly advise you to use UUIDs instead of usernames.</i> <small><a href="#usernames">more info</a></small>
</div>
<h2>Documentation</h2> <h2>Documentation</h2>
<div class="row"> <div class="row">
<section> <section>
<a id="avatars" class="anchor"></a><a href="#avatars"><h3>Avatars</h3></a>Replace <a id="avatars" class="anchor"></a><a href="#avatars"><h3>Avatars</h3></a>
<mark class="green"> userid</mark> with a Mojang <b>UUID</b> or <b>username</b> to get the related head. All images are PNGs. <div class="code"><%= domain %>/avatars/<mark class="green">uuid</mark>
<div class="code"><%= domain %>/avatars/
<mark class="green">userid</mark>
</div> </div>
<section> <section>
<a id="avatar-parameters" class="anchor"></a><a href="#avatar-parameters"><h4>Avatar Parameters</h4></a> <a id="avatar-parameters" class="anchor"></a><a href="#avatar-parameters"><h4>Avatar Parameters</h4></a>
@ -84,8 +89,8 @@
<td>string</td> <td>string</td>
<td>The standard value is calculated based on the UUID (even = MHF_Alex, odd = MHF_Steve).<br> <td>The standard value is calculated based on the UUID (even = MHF_Alex, odd = MHF_Steve).<br>
Usernames always default to MHF_Steve.</td> Usernames always default to MHF_Steve.</td>
<td>The image to be served when the userid has no skin.<br> <td>The image to be served when the player has no skin.<br>
Valid options are any userid, including<a href="/avatars/0?default=MHF_Steve"> MHF_Steve</a> and<a href="/avatars/0?default=MHF_Alex"> MHF_Alex</a>, or a custom URL.</td> Valid options are any name or uuid, including<a href="/avatars/0?default=MHF_Steve"> MHF_Steve</a> and<a href="/avatars/0?default=MHF_Alex"> MHF_Alex</a>, or a custom URL.</td>
</tr> </tr>
<tr> <tr>
<td>helm</td> <td>helm</td>
@ -132,8 +137,7 @@
<a id="renders" class="anchor"></a><a href="#renders"><h3>3D Renders</h3></a> <a id="renders" class="anchor"></a><a href="#renders"><h3>3D Renders</h3></a>
<p>Crafatar also provides support for 3D renders of Minecraft skins.<br> <p>Crafatar also provides support for 3D renders of Minecraft skins.<br>
Please note that <b>this feature is currently beta</b>!<br> Please note that <b>this feature is currently beta</b>!<br>
Replace The <b>head</b> render type returns a render of the skin's head.<span class="code"><%= domain %>/renders/head/<mark class="green">uuid</mark></span>The <b>body</b> render returns a render of the entire skin.<span class="code"><%= domain %>/renders/body/<mark class="green">uuid</mark></span></p>
<mark class="green"> userid</mark> with a Mojang <b>UUID</b> or <b>username</b> to get a render of the skin. The <b>head</b> render type returns a render of the skin's head.<span class="code"><%= domain %>/renders/head/<mark class="green">userid</mark></span>The <b>body</b> render returns a render of the entire skin.<span class="code"><%= domain %>/renders/body/<mark class="green">userid</mark></span></p>
<section> <section>
<a id="render-parameters" class="anchor"></a><a href="#render-parameters"><h4>Render Parameters</h4></a> <a id="render-parameters" class="anchor"></a><a href="#render-parameters"><h4>Render Parameters</h4></a>
<table class="table table-striped"> <table class="table table-striped">
@ -163,8 +167,8 @@
<td>string</td> <td>string</td>
<td>The standard value is calculated based on the UUID (even = MHF_Alex, odd = MHF_Steve).<br> <td>The standard value is calculated based on the UUID (even = MHF_Alex, odd = MHF_Steve).<br>
Usernames always default to MHF_Steve.</td> Usernames always default to MHF_Steve.</td>
<td>The image to be served when the userid has no skin.<br> <td>The image to be served when the uuid has no skin.<br>
Valid options are any userid, including<a href="/renders/body/0?default=MHF_Steve"> MHF_Steve</a> and<a href="/renders/body/0?default=MHF_Alex"> MHF_Alex</a>, or a custom URL.</td> Valid options are any uuid, including<a href="/renders/body/0?default=MHF_Steve"> MHF_Steve</a> and<a href="/renders/body/0?default=MHF_Alex"> MHF_Alex</a>, or a custom URL.</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -188,10 +192,8 @@
<section> <section>
<a id="skins" class="anchor"></a><a href="#skins"><h3>Skins</h3></a> <a id="skins" class="anchor"></a><a href="#skins"><h3>Skins</h3></a>
<p>You can also get the full skin file of a player.<br> <p>You can also get the full skin file of a player.<br>
Replace
<mark class="green"> userid</mark> with a Mojang <b>UUID</b> or <b>username</b> to get the related skin.<br>
The user's skin is returned, or the default image is served.<br> The user's skin is returned, or the default image is served.<br>
You can use the default parameter here as well.<span class="code"><%= domain %>/skins/<mark class="green">userid</mark></span></p> You can use the default parameter here as well.<span class="code"><%= domain %>/skins/<mark class="green">uuid</mark></span></p>
<section> <section>
<a id="skin-parameters" class="anchor"></a><a href="#skin-parameters"><h4>Skin Parameters</h4></a> <a id="skin-parameters" class="anchor"></a><a href="#skin-parameters"><h4>Skin Parameters</h4></a>
<table class="table table-striped"> <table class="table table-striped">
@ -209,8 +211,8 @@
<td>string</td> <td>string</td>
<td>The standard value is calculated based on the UUID (even = MHF_Alex, odd = MHF_Steve).<br> <td>The standard value is calculated based on the UUID (even = MHF_Alex, odd = MHF_Steve).<br>
Usernames always default to MHF_Steve.</td> Usernames always default to MHF_Steve.</td>
<td>The image to be served when the userid has no skin.<br> <td>The image to be served when the uuid has no skin.<br>
Valid options are any userid, including<a href="/skins/0?default=MHF_Steve"> MHF_Steve</a> and<a href="/skins/0?default=MHF_Alex"> MHF_Alex</a>, or a custom URL.</td> Valid options are any uuid, including<a href="/skins/0?default=MHF_Steve"> MHF_Steve</a> and<a href="/skins/0?default=MHF_Alex"> MHF_Alex</a>, or a custom URL.</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -234,11 +236,8 @@
<section> <section>
<a id="capes" class="anchor"></a><a href="#capes"><h3>Capes</h3></a> <a id="capes" class="anchor"></a><a href="#capes"><h3>Capes</h3></a>
<p>A cape endpoint is also available to get the active cape of a user.<br> <p>A cape endpoint is also available to get the active cape of a user.<br>
Replace
<mark class="green"> userid</mark> with a Mojang <b>UUID</b> or <b>username</b> to get the related cape.<br>
The user's cape is returned, otherwise a 404 is returned.<br> The user's cape is returned, otherwise a 404 is returned.<br>
<div class="code"><%= domain %>/capes/ <div class="code"><%= domain %>/capes/<mark class="green">uuid</mark>
<mark class="green">userid</mark>
</div> </div>
</p> </p>
<section> <section>
@ -282,7 +281,7 @@
<li><b>downloaded</b>: 2 external requests. First request or skin changed, skin downloaded.</li> <li><b>downloaded</b>: 2 external requests. First request or skin changed, skin downloaded.</li>
<li><b>server error</b>: This can happen, for example, when Mojang's servers are down.<br> <li><b>server error</b>: This can happen, for example, when Mojang's servers are down.<br>
If possible, a cached image is served instead.</li> If possible, a cached image is served instead.</li>
<li><b>user error</b>: You have done something wrong, such as requesting a malformed userid.<br> <li><b>user error</b>: You have done something wrong, such as requesting a malformed uuid.<br>
Check the response body for details.</li> Check the response body for details.</li>
</ul> </ul>
</section> </section>
@ -292,12 +291,16 @@
If you think something is wrong with your request, please <a href="#contact">contact us</a> and provide this ID.</p> If you think something is wrong with your request, please <a href="#contact">contact us</a> and provide this ID.</p>
</section> </section>
</section> </section>
<section> <section id="usernames">
<a id="meta-about-usernames" class="anchor"></a><a href="#meta-about-usernames"><h3>About Usernames</h3></a> <a href="#usernames"><h3>About Usernames</h3></a>
<p>We strongly advise you to use UUIDs instead of usernames in production.<br> <p>
Usernames are deprecated by Mojang and you should only use usernames for testing.<br> We <strong>strongly</strong> advise you to use UUIDs instead of usernames! UUIDs never change while usernames do.<br>
You don't have to change anything when using UUIDs and someone changes their Username.<br> Looking up players by username has officially been deprecated by Mojang ever since UUIDs were introduced.<br>
Malformed usernames are rejected.</p> Crafatar uses a legacy API to retrieve skins for usernames that updates very slowly.<br>
Skins come without any details, including whether a player uses the Alex or Steve skin model.<br>
Additionally, Mojang has stated that this legacy interface may be disabled anytime, causing all requests to fail.<br>
Malformed usernames are rejected.
</p>
</section> </section>
<section> <section>
<a id="meta-about-uuids" class="anchor"></a><a href="#meta-about-uuids"><h3>About UUIDs</h3></a> <a id="meta-about-uuids" class="anchor"></a><a href="#meta-about-uuids"><h3>About UUIDs</h3></a>