1 个不稳定版本

0.1.0 2023年5月22日

#61 in #synchronous

MIT 许可证

29KB
687

Gotify-rs

一个用于从 Rust 使用 Gotify 的 API 的 Rust 库。此库是优秀的 python-gotify 包的移植版本。

正在进行中!


lib.rs:

Gotify-rs 是一个包装 Gotify API 的库。有两个接口可以使用

  • SyncGotify,这是 Gotify API 的同步包装器。
  • AsyncGotify,这是 Gotify API 的异步包装器。

使用同步接口创建应用程序的示例

let gotify = SyncGetify::new("https://my.gotify.server/", "a_client_token", None);
let app = gotify.create_application("App name".to_string(), "App description".to_string()).expect("Failed to create application");
gotify.gotify.config(None, &app.token, None);
let message = gotify.create_message("Hello world!".to_string(), Some(0), "Test message".to_string()).expect("Failed to create message");

依赖关系

~4–16MB
~240K SLoC