UNPKG

ddnet

Version:

A typescript npm package for interacting with data from ddnet.org

55 lines 1.52 kB
/** * Represents a DDNet server's status. * * @remarks * Documentation missing due to my lack of network knowledge. * * @see * https://github.com/ddnet/ddnet-scripts/blob/8e0909edbeb5d7a6446349dc66a3beb0f5ddccc7/servers/serverstatus-client.py */ export class ServerStatus { name; domain; host; location; online4; online6; uptime; load; network_rx; network_tx; packets_rx; packets_tx; cpu; memory_total; memory_used; swap_total; swap_used; hdd_total; hdd_used; /** * Construct a new {@link ServerStatus} instance. */ constructor(data) { this.name = data.name; this.domain = data.type; this.host = data.host; this.location = data.location; this.online4 = data.online4; this.online6 = data.online6; this.uptime = data.uptime ?? null; this.load = data.load ?? null; this.network_rx = data.network_rx ?? null; this.network_tx = data.network_tx ?? null; this.packets_rx = data.packets_rx ?? null; this.packets_tx = data.packets_tx ?? null; this.cpu = data.cpu ?? null; this.memory_total = data.memory_total ?? null; this.memory_used = data.memory_used ?? null; this.swap_total = data.swap_total ?? null; this.swap_used = data.swap_used ?? null; this.hdd_total = data.hdd_total ?? null; this.hdd_used = data.hdd_used ?? null; } } //# sourceMappingURL=ServerStatus.js.map