index.jade 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. extends layout
  2. block content
  3. .container(style= "margin-top: 30px;")
  4. .row
  5. .col-md-10
  6. h1 Crafatar
  7. hr
  8. p Welcome to Crafatar, an API for Minecraft's faces!
  9. h2 API
  10. hr
  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. .well.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 180.
  23. h4 default
  24. p The image to be returned when the uuid has no skin. <br> Valid options are
  25. a(href="/avatars/00000000000000000000000000000000?default=steve") steve
  26. | or
  27. a(href="/avatars/00000000000000000000000000000000?default=alex") alex
  28. | .<br> Otherwise, a 404 with no content is returned.
  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 seconds, it took Crafatar to process the request.
  35. h4 X-Storage-Type
  36. p Either 'local' or 'downloaded'. Local means that Crafatar already had the image on disk, while downloaded means that it was retrieved from Mojang's skin servers.
  37. h3 Examples
  38. p Get jeb_'s avatar, 180 × 180 pixels
  39. img(src="#{domain}/avatars/853c80ef3c3749fdaa49938b674adae6")
  40. .well.code &lt;img src="#{domain}/avatars/853c80ef3c3749fdaa49938b674adae6"&gt;
  41. p Get jeb_'s avatar, 64 × 64 pixels
  42. img(src="#{domain}/avatars/853c80ef3c3749fdaa49938b674adae6?size=64")
  43. .well.code &lt;img src="#{domain}/avatars/853c80ef3c3749fdaa49938b674adae6?size=64"&gt;
  44. p Get jeb_'s helmet avatar, 64 × 64 pixels
  45. img(src="#{domain}/avatars/853c80ef3c3749fdaa49938b674adae6?size=64&helm")
  46. .well.code &lt;img src="#{domain}/avatars/853c80ef3c3749fdaa49938b674adae6?size=64&amp;helm"&gt;
  47. p Get jeb_'s avatar, 64 × 64 pixels, or fall back to steve if his avatar is not found
  48. img(src="#{domain}/avatars/00000000000000000000000000000000?default=steve&size=64")
  49. .well.code &lt;img src="#{domain}/avatars/853c80ef3c3749fdaa49938b674adae6?default=steve&amp;size=64"&gt;
  50. .col-md-2
  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")