index.jade 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. extends layout
  2. block content
  3. .container(style= "margin-top: 70px;")
  4. .row
  5. .col-md-10
  6. h1 Crafatar
  7. hr
  8. p Welcome to Crafatar, an API for Minecraft's faces!
  9. hr
  10. h2 Documentation
  11. h3 Endpoint
  12. p
  13. | Replace
  14. mark.green uuid
  15. | with a Mojang UUID to get the related head. All images are PNGs.
  16. .code
  17. | <img src="#{domain}/avatars/
  18. mark.green uuid
  19. | ">
  20. h3 Parameters
  21. h4 size
  22. p The size of the image in pixels, 1 - 512. <br> Default is 160.
  23. h4 default
  24. p The image to be returned when the uuid has no skin (404). <br> Valid options are
  25. a(href="/avatars/00000000000000000000000000000000?default=steve") steve
  26. | or
  27. a(href="/avatars/00000000000000000000000000000000?default=alex") alex
  28. | .<br> The standard value is calculated based on the UUID (even = alex, odd = steve)
  29. h4 helm
  30. p Get an avatar with the second (helmet) layer applied. <br> The content of this parameter is ignored
  31. h3 HTTP headers
  32. p Images will come with these HTTP headers, useful for debugging.
  33. h4 Response-Time
  34. p The time, in milliseconds, it took Crafatar to process the request.
  35. h4 X-Storage-Type
  36. ul
  37. li <b>none</b>: No external requests. Cached: User has no skin.
  38. li <b>cached</b>: No external requests. Skin cached and stored locally.
  39. li <b>checked</b>: 1 external request. Skin cached, checked for updates, no skin downloaded.<br>
  40. | This happens either when the user has no skin or it didn't change.
  41. li <b>downloaded</b>: 2 external requests. Skin changed or unknown, downloaded.
  42. li <b>error</b>: This can happen, for example, when Mojang's servers are down. If possible, an outdated image will be served instead.
  43. h3 Examples
  44. p Get jeb_'s avatar, 160 × 160 pixels
  45. .code &lt;img src="#{domain}/avatars/853c80ef3c3749fdaa49938b674adae6"&gt;
  46. p Get jeb_'s avatar, 64 × 64 pixels
  47. .code &lt;img src="#{domain}/avatars/853c80ef3c3749fdaa49938b674adae6?size=64"&gt;
  48. p Get jeb_'s helmet avatar, 64 × 64 pixels
  49. .code &lt;img src="#{domain}/avatars/853c80ef3c3749fdaa49938b674adae6?size=64&amp;helm"&gt;
  50. .col-md-2.center
  51. .sideface.redstone_sheep(title="redstone_sheep")
  52. .sideface.Jake0oo0(title="Jake0oo0")
  53. .sideface.Notch(title="Notch")
  54. .sideface.sk89q(title="sk89q")
  55. .sideface.md_5(title="md_5")