From c85073eec23214b205d971d29b00817d3f68a153 Mon Sep 17 00:00:00 2001 From: PiSaucer <33438654+PiSaucer@users.noreply.github.com> Date: Thu, 27 Apr 2023 09:30:48 -0500 Subject: [PATCH] Create README.md --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..837126c --- /dev/null +++ b/README.md @@ -0,0 +1,25 @@ +# Mojang API + +This type script module allows you do download skins and capes from Minecraft Players using [api.mojang.com](https://api.mojang.com/) + +```ts +import { getUser, getProfile, getTextures, getSkin, getCape } from "./index.js"; + +const [skin,cape] = await getUser("Offroaders123") + .then(getProfile) + .then(getTextures) + .then(textures => { + if (textures === null){ + throw new Error("No textures were found for this player!"); + } + return Promise.all([ + getSkin(textures), + getCape(textures) + ]); + }); + ``` + + --- + + For more information please visit: [wiki.vg/Mojang_API](https://wiki.vg/Mojang_API) +