pub struct CloudConvertClient { /* private fields */ }Expand description
Entry point for authenticated CloudConvert API calls and file transfer.
Implementations§
Source§impl CloudConvertClient
impl CloudConvertClient
Sourcepub fn builder(api_key: ApiKey) -> ClientBuilder
pub fn builder(api_key: ApiKey) -> ClientBuilder
Starts a client builder authenticated with an API key.
Sourcepub fn builder_with_access_token(
access_token: OAuthAccessToken,
) -> ClientBuilder
pub fn builder_with_access_token( access_token: OAuthAccessToken, ) -> ClientBuilder
Starts a client builder authenticated with an OAuth access token.
Sourcepub fn config(&self) -> &CloudConvertConfig
pub fn config(&self) -> &CloudConvertConfig
Returns the resolved client configuration, including base URLs and region.
Sourcepub fn jobs(&self) -> JobsResource
pub fn jobs(&self) -> JobsResource
Job lifecycle endpoints: create, wait, list, and delete.
Sourcepub fn tasks(&self) -> TasksResource
pub fn tasks(&self) -> TasksResource
Standalone task endpoints outside a job graph.
Sourcepub fn users(&self) -> UsersResource
pub fn users(&self) -> UsersResource
Account endpoints and user-scoped Socket.IO subscriptions.
Sourcepub fn webhooks(&self) -> WebhooksResource
pub fn webhooks(&self) -> WebhooksResource
Webhook registration and listing for the authenticated account.
Sourcepub fn operations(&self) -> OperationsResource
pub fn operations(&self) -> OperationsResource
CloudConvert operations metadata used to discover engines and options.
Sourcepub fn socket_base_url(&self) -> &'static str
pub fn socket_base_url(&self) -> &'static str
Socket.IO base URL for the client’s sandbox or production environment.
Sourcepub fn socket_subscription(&self, channel: SocketChannel) -> SocketSubscription
pub fn socket_subscription(&self, channel: SocketChannel) -> SocketSubscription
Builds a bearer-authenticated subscription payload for a Socket.IO channel.
Sourcepub async fn download(&self, url: impl AsRef<str>) -> Result<Bytes>
pub async fn download(&self, url: impl AsRef<str>) -> Result<Bytes>
Downloads a URL, typically an export file link, into memory.
Sourcepub async fn download_stream(
&self,
url: impl AsRef<str>,
) -> Result<impl Stream<Item = Result<Bytes>>>
pub async fn download_stream( &self, url: impl AsRef<str>, ) -> Result<impl Stream<Item = Result<Bytes>>>
Streams a download without buffering the full response in memory.
Sourcepub async fn download_to_path(
&self,
url: impl AsRef<str>,
destination: impl AsRef<Path>,
) -> Result<()>
pub async fn download_to_path( &self, url: impl AsRef<str>, destination: impl AsRef<Path>, ) -> Result<()>
Streams a download to destination through a sibling temporary file.
The destination is replaced atomically on success; the temp file is removed if the download or rename fails.
Sourcepub async fn upload_bytes(
&self,
task: &Task,
filename: impl Into<String>,
bytes: impl Into<Bytes>,
) -> Result<()>
pub async fn upload_bytes( &self, task: &Task, filename: impl Into<String>, bytes: impl Into<Bytes>, ) -> Result<()>
Uploads bytes to an import/upload task using its presigned form.
Returns Error::UploadTaskNotReady when the task has no upload form yet.
pub async fn upload_body( &self, task: &Task, filename: impl Into<String>, body: Body, ) -> Result<()>
pub async fn upload_stream<S, B, E>( &self, task: &Task, filename: impl Into<String>, stream: S, ) -> Result<()>
pub async fn upload_path( &self, task: &Task, path: impl AsRef<Path>, ) -> Result<()>
Trait Implementations§
Source§impl Clone for CloudConvertClient
impl Clone for CloudConvertClient
Source§fn clone(&self) -> CloudConvertClient
fn clone(&self) -> CloudConvertClient
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more