use std::sync::Arc;
use crate::client::HttpCore;
use crate::error::Result;
use crate::types::*;
#[derive(Debug, Clone)]
pub struct CoordinationAlerts {
pub(crate) core: Arc<HttpCore>,
}
impl CoordinationAlerts {
pub async fn list(&self) -> Result<CoordinationAlertListResponse> {
self.core.get("/kol/coordination/alerts", &()).await
}
pub async fn create(
&self,
params: &CoordinationAlertCreateParams,
) -> Result<CoordinationAlertCreateResponse> {
self.core
.post_json("/kol/coordination/alerts", params)
.await
}
pub async fn get(&self, id: &str) -> Result<CoordinationAlertGetResponse> {
self.core
.get(&format!("/kol/coordination/alerts/{}", id), &())
.await
}
pub async fn update(
&self,
id: &str,
params: &CoordinationAlertUpdateParams,
) -> Result<CoordinationAlertUpdateResponse> {
self.core
.patch_json(&format!("/kol/coordination/alerts/{}", id), params)
.await
}
pub async fn delete(&self, id: &str) -> Result<CoordinationAlertDeleteResponse> {
self.core
.delete(&format!("/kol/coordination/alerts/{}", id))
.await
}
}