hey-sdk 0.30.0

Rust client for the HEY API, generated from a Smithy model of the API
Documentation
// Generated by hey-sdk-generator from openapi.json and behavior-model.json. DO NOT EDIT.

#![allow(clippy::too_many_arguments)]

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 }
    }

    /// The client this service sends through.
    pub fn client(&self) -> &'a Client {
        self.client
    }

    /// Whether a thread is shared with a public link, and the link
    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
    }
}