2 sdk/js/mojang/status
Braydon edited this page 2024-04-15 12:59:42 -07:00

Server Status

Example

import {
	getMojangServerStatus,
	type MojangServerStatusResponse,
} from "restfulmc-lib";

const serverStatus: MojangServerStatusResponse = await getMojangServerStatus(); // Get the status of Mojang's servers
console.log(serverStatus); // Log the status of Mojang's servers

Output

$ bun index.ts
{
  "https://libraries.minecraft.net": "ONLINE",
  "https://api.mojang.com": "ONLINE",
  "https://sessionserver.mojang.com": "ONLINE",
  "https://assets.mojang.com": "ONLINE",
  "https://textures.minecraft.net": "ONLINE",
}