Find a file
2023-08-20 18:49:11 +03:00
src Allow to change ping, status and message via event 2023-08-20 18:49:11 +03:00
.gitignore Minor changes to test in codespaces 2022-05-21 19:35:19 +00:00
.npmignore Initial commit 2021-12-19 19:49:22 +03:00
package.json Allow to change ping, status and message via event 2023-08-20 18:49:11 +03:00
README.md Allow to change ping, status and message via event 2023-08-20 18:49:11 +03:00

UptimeKuma-api

Supports UptimeKuma versions from 1.13.1 to 1.21.0

Installation

npm install uptimekuma-api

Usage

Start pushing

let kuma = new UptimeKuma("https://kuma.url/");

kuma.startPushing("push code",60);

Stop pushing

kuma.cancelPushing();

Get statuses

for (let x of (await kuma.status())) {
    for (let monitor of x.monitors) {
        console.log(monitor.name + " " + monitor.heartbeats[1].status+ " - " + (monitor.uptime*100) + "%");
    }
}