node-updown
Version:
Transparent Node.JS wrapper for the updown.io API
59 lines • 2.02 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const getChecks_1 = require("../api/getChecks");
const getCheck_1 = require("../api/getCheck");
const getDowntimes_1 = require("../api/getDowntimes");
const getMetrics_1 = require("../api/getMetrics");
const addCheck_1 = require("../api/addCheck");
const updateCheck_1 = require("../api/updateCheck");
const deleteCheck_1 = require("../api/deleteCheck");
const getNodes_1 = require("../api/getNodes");
const getWebhooks_1 = require("../api/getWebhooks");
const addWebhook_1 = require("../api/addWebhook");
const deleteWebhook_1 = require("../api/deleteWebhook");
class UpdownClient {
constructor(apiKey) {
this.apiKey = apiKey;
}
getChecks() {
return getChecks_1.getChecks(this.apiKey);
}
getCheck(token, options) {
return getCheck_1.getCheck(this.apiKey, token, options);
}
getDowntimes(token, options) {
return getDowntimes_1.getDowntimes(this.apiKey, token, options);
}
getMetrics(token, options = {}) {
return getMetrics_1.getMetrics(this.apiKey, token, options);
}
addCheck(options) {
return addCheck_1.addCheck(this.apiKey, options);
}
updateCheck(token, options) {
return updateCheck_1.updateCheck(this.apiKey, token, options);
}
deleteCheck(token) {
return deleteCheck_1.deleteCheck(this.apiKey, token);
}
getNodes() {
return getNodes_1.getNodes();
}
getIpv4Nodes() {
return getNodes_1.getIpv4Nodes();
}
getIpv6Nodes() {
return getNodes_1.getIpv6Nodes();
}
getWebhooks() {
return getWebhooks_1.getWebhooks(this.apiKey);
}
addWebhook(options) {
return addWebhook_1.addWebhook(this.apiKey, options);
}
deleteWebhook(id) {
return deleteWebhook_1.deleteWebhook(this.apiKey, id);
}
}
exports.UpdownClient = UpdownClient;
//# sourceMappingURL=UpdownClient.js.map