use crate::{Client, Ping, Result, SystemService};
impl Client {
pub async fn ping(&self) -> Result<Ping> {
self.get_json("/status/ping").await
}
pub async fn system_services(&self) -> Result<Vec<SystemService>> {
self.get_json("/system-services").await
}
pub async fn set_system_service(&self, key: &str, action: &str) -> Result<()> {
self.post_empty(
"/system-services/status",
&serde_json::json!({ "key": key, "action": action }),
)
.await
}
}