| Crates.io | kuma-rs |
| lib.rs | kuma-rs |
| version | 0.1.1 |
| created_at | 2024-12-21 08:58:11.648727+00 |
| updated_at | 2024-12-21 08:58:11.648727+00 |
| description | A simple and easy library for interacting with Uptime Kuma |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1490853 |
| size | 204,785 |
If you use both Rust and Kuma you may have noticed that there practically are no libraries for it, until now
I made this program as part of a project integrate LEDs with Kuma
There is no binary of CLI yet but you can use the library, all you need is a few dependencies, a Kuma instance and an .env file
# the key will look something like this
# do NOT include a ':' at the start, it is not needed
# don't share your key with anyone
KEY="EXAMPLEKEY"
# the URI should NOT include HTTP/HTTPS
# HTTP support is not currently included
URI="kuma.instance/metrics"
#[tokio::main]
async fn main() {
let _ = dotenv();
let data = Kuma::new(env::var("URI").unwrap(), env::var("KEY").unwrap())
.get()
.await
.unwrap();
}
git clone https://github.com/toastxc/kuma-rs.git
cd kuma-rs/
rustup update
cargo b -r --example gui
cp ./target/release/examples/gui ./target/release/
sudo flatpak-builder --install --force-clean build-dir xyz.toastxc.Kuma.yaml
cargo r --example gui
cargo add kuma-rs