#![allow(clippy::too_many_arguments)]
use crate::client::Client;
use crate::error::Error;
use crate::generated::routes;
use crate::generated::types::*;
pub struct Attachments<'a> {
client: &'a Client,
}
impl<'a> Attachments<'a> {
pub(crate) fn new(client: &'a Client) -> Self {
Self { client }
}
pub fn client(&self) -> &'a Client {
self.client
}
pub async fn create_direct_upload(
&self,
body: &CreateDirectUploadRequestContent,
) -> Result<DirectUpload, Error> {
let mut operation = self.client.operation(&routes::CREATE_DIRECT_UPLOAD, &[]);
operation.json(body)?;
self.client.send(operation).await
}
}