use crate::prelude::*;
use rive_models::data::PushSubscribeData;
impl Client {
pub async fn push_subscribe(&self, data: PushSubscribeData) -> Result<()> {
self.client
.post(ep!(self, "/push/subscribe"))
.json(&data)
.auth(&self.authentication)
.send()
.await?
.process_error()
.await?;
Ok(())
}
pub async fn push_unsubscribe(&self) -> Result<()> {
self.client
.post(ep!(self, "/push/unsubscribe"))
.auth(&self.authentication)
.send()
.await?
.process_error()
.await?;
Ok(())
}
}