use crate::model::*;
use crate::JyveClient;
use serde_json::json;
#[derive(Clone)]
pub struct NotificationsListAcknowledgeRequest<'a> {
pub(crate) http_client: &'a JyveClient,
pub data: Notification,
}
impl<'a> NotificationsListAcknowledgeRequest<'a> {
pub async fn send(self) -> ::httpclient::InMemoryResult<Notification> {
let mut r = self.http_client.client.post("/notifications/bulk-acknowledge-action/");
r = r.json(json!({ "data" : self.data }));
r = self.http_client.authenticate(r);
let res = r.send_awaiting_body().await?;
res.json()
}
}
impl<'a> ::std::future::IntoFuture for NotificationsListAcknowledgeRequest<'a> {
type Output = httpclient::InMemoryResult<Notification>;
type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>;
fn into_future(self) -> Self::IntoFuture {
Box::pin(self.send())
}
}