#![allow(missing_docs, unreachable_pub, clippy::all, clippy::pedantic)]
use crate::client::Client;
use crate::error::Error;
use crate::generated::routes;
use crate::generated::types::*;
pub struct Publications<'a> {
client: &'a Client,
}
impl<'a> Publications<'a> {
pub(crate) fn new(client: &'a Client) -> Self {
Self { client }
}
pub fn client(&self) -> &'a Client {
self.client
}
pub async fn get(&self, topic_id: i64) -> Result<GetTopicPublicationResponseContent, Error> {
let mut operation = self
.client
.operation(&routes::GET_TOPIC_PUBLICATION, &[&topic_id]);
operation.resource_id(topic_id);
self.client.send(operation).await
}
}