Expand description
§Creating a client
To create a Client
using a bearer token, then create a job:
use cloudconvert::{Client, job};
let client = Client::default_client("your_bearer_token");
client.call(job::Create{
tasks: todo!(),
tag: Some("your_tag".into()),
webhook_url: None,
}).await;
§Jobs
Jobs can be crated using the job::Create
API call. Jobs consist of a number of named
task
s.
§Tasks
A task::Task
enum represents one of the following tasks:
§Import tasks
task::ImportUrl
: Import a document from a URL.task::ImportS3
: Import a document from an S3 compatible bucket.task::ImportAzureBlob
: Import a document from Azure Blob Storage.task::ImportGoogleCloud
: Import a document from Google Cloud Storage.task::ImportOpenStack
: Import a document from OpenStack Object Storage (Swift).task::ImportSFTP
: Import a document from an SFTP server.
§Processing tasks
task::Convert
: Convert a document!task::Optimize
: Optimize a document.task::Watermark
: Watermark a document.task::Thumbnail
: Add a thumbnail to a document.task::Merge
: Merge multiple documents.task::Archive
: Create zip, rar, 7z or tar archives.task::Capture
: Capture a website.
§Export tasks
task::ExportUrl
: Export a document to a URL.task::ExportS3
: Export documents to an S3 compatible bucket.task::ExportAzureBlob
: Export documents to Azure Blob Storage.task::ExportGoogleCloud
: Export documents to Google Cloud Storage.task::ExportOpenStack
: Export documents to OpenStack Object Storage (Swift).task::ExportSFTP
: Export documents to an SFTP server.
§Pre-made jobs
ImportConvertExport
: An API call (underneath,job::Create
) which creates a job consisting of an import task, convert task, then export task.
§Webhooks
Tools for verifying and parsing webhooks can be found within the webhook
module.
Modules§
- job
- Types for creating and viewing jobs.
- task
- Types related to managing tasks. See the crate level docs for a nice list of available tasks.
- webhook
- Tools for verifying and parsing webhook calls.
Structs§
- Client
- The API client. This is used to call items implementing
ApiCall
. Usually, this isjob::Create
, but it can be anytask::Task
. - Import
Convert Export - An API call, which underneath converts to a
job::Create
call, to import from a URL, convert, and then export to a URL.
Enums§
- Error
- Format
- A format supported by CloudConvert.
- Status
- Status of a
job::Job
ortask::Status
.
Traits§
Type Aliases§
- Hyper
Client - A
Client
usinghyper
for transport.