fnbr
Version:
A library to interact with Epic Games' Fortnite HTTP and XMPP services
31 lines • 1.43 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const Base_1 = tslib_1.__importDefault(require("../Base"));
const EpicgamesServerStatusComponent_1 = tslib_1.__importDefault(require("./EpicgamesServerStatusComponent"));
const EpicgamesServerStatusIncident_1 = tslib_1.__importDefault(require("./EpicgamesServerStatusIncident"));
/**
* Represents an Epicgames server status
*/
class EpicgamesServerStatus extends Base_1.default {
/**
* @param client The main client
* @param data The server status data
*/
constructor(client, data) {
super(client);
this.id = data.page.id;
this.name = data.page.name;
this.url = data.page.url;
this.updatedAt = new Date(data.page.updated_at);
this.statusIndicator = data.status.indicator;
this.statusDescription = data.status.description;
this.components = data.components
.filter((c) => !c.group_id)
.map((c) => new EpicgamesServerStatusComponent_1.default(client, c, data.components));
this.incidents = data.incidents.map((i) => new EpicgamesServerStatusIncident_1.default(client, i));
this.scheduledMainteances = data.scheduled_maintenances.map((m) => new EpicgamesServerStatusIncident_1.default(client, m));
}
}
exports.default = EpicgamesServerStatus;
//# sourceMappingURL=EpicgamesServerStatus.js.map