Find a file
2023-12-26 23:22:12 +03:00
src Allow to start multiple push tasks 2023-08-20 22:47:52 +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 start multiple push tasks 2023-08-20 22:47:52 +03:00
README.md Bump supported versions after testing 2023-12-26 23:22:12 +03:00

UptimeKuma-api

Supports UptimeKuma versions from 1.13.1 to 1.23.10

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) + "%");
    }
}