From cbb534adf420fc52db9c5cad31daf3ef0c41d844 Mon Sep 17 00:00:00 2001 From: Liam Date: Wed, 17 Apr 2024 17:51:39 +0100 Subject: [PATCH] update readme --- README.md | 7 ++----- src/index.ts | 3 +++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 2d5afe3..19407c7 100644 --- a/README.md +++ b/README.md @@ -13,10 +13,9 @@ npm install mcutils-library Get player: ```javascript -import { getPlayer } from "mcutils-library"; +import { getPlayer, CachedPlayer } from "mcutils-library"; const cachedPlayer = await getPlayer(playerId); -const { player } = cachedPlayer; console.log(player); ``` @@ -24,11 +23,9 @@ console.log(player); Get Server: ```javascript -import { getServer } from "mcutils-library"; -import JavaMinecraftServer from "mcutils-library/dist/types/server/javaServer"; +import { getServer, CachedJavaMinecraftServer } from "mcutils-library"; const cachedServer = await getServer(ServerPlatform.Java, "hypixel.net"); -const { server } = cachedServer; console.log(server); ``` diff --git a/src/index.ts b/src/index.ts index fdbda9a..d36d470 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,6 @@ +/** + * The base URL for the API. + */ export const API_ENDPOINT = "https://api.mcutils.xyz"; // Methods