Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/toastxc/kuma-rs
A simple and easy library for interacting with Uptime Kuma
https://github.com/toastxc/kuma-rs
high-availability rust rust-lang uptime uptime-kuma uptime-monitor
Last synced: 18 days ago
JSON representation
A simple and easy library for interacting with Uptime Kuma
- Host: GitHub
- URL: https://github.com/toastxc/kuma-rs
- Owner: toastxc
- Created: 2024-03-24T15:39:41.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-07-01T07:14:15.000Z (6 months ago)
- Last Synced: 2024-11-24T20:53:39.091Z (about 1 month ago)
- Topics: high-availability, rust, rust-lang, uptime, uptime-kuma, uptime-monitor
- Language: Rust
- Homepage:
- Size: 63.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## A library for UptimeKuma, at last
If you use both Rust and Kuma you may have noticed that there practically are no libraries for it, until now## Purpose
I made this program as part of a project integrate LEDs with Kuma## Usage
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
### dotenv
```dotenv
# 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"
```
### main.rs
```rust
#[tokio::main]
async fn main() {
let _ = dotenv();
let data = Kuma::new(env::var("URI").unwrap(), env::var("KEY").unwrap())
.get()
.await
.unwrap();
}
```## GUI
### Installing
```bash
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
```
### Running
```bash
cargo r --example gui
```## Library
### Installing
```bash
cargo add kuma-rs
```