Conversion Tools API Rust client

Overview

ConversionTools Rust

This Conversion Tools API Rust client allows you to use the site API and convert files faster and more conveniently.

Site Conversion Tools allows you to convert files from one format to another.

To use the library, you will need a API-Token, which you can find in your profile.

How to use

You can find examples of using all functions in the ConversionTools-Rust-Examples repository

Get All Tasks

use conversion_tools_api::api::Api;

let object: Api = Api::new(String::from("Your Token"), String::from("Url"));
let tasks: Result<Value, Error> = object.get_tasks();
println!("{}", tasks.unwrap()); //print json response

Upload File

use conversion_tools_api::api::Api;

let object: Api = Api::new(String::from("Your Token"), String::from("Url"));
let result: Result<Value, Error> = object.upload_file(&"path");
println!("{}", result.unwrap()); //print json response

Create task (start converting)

use std::collections::HashMap;
use conversion_tools_api::api::Api;

let mut args: HashMap<&str, &str> = HashMap::new();
args.insert("orientation", "Portrait");

let type_convert: &str = "convert.jpg_to_pdf";
let object: Api = Api::new(String::from("Your Token"), String::from("Url"));
let result: Result<Value, Error> = object.create_task(&type_convert, &"file_id", &args);
println!("{}", result.unwrap()); //print json response

Get Task

use conversion_tools_api::api::Api;

let object: Api = Api::new(String::from("Your Token"), String::from("Url"));
let result: Result<Value, Error> = object.get_task(&"task_id");
println!("{}", result.unwrap()); //print json response

Download File

use conversion_tools_api::api::Api;

let object: Api = Api::new(String::from("Your Token"), String::from("Url"));
let result: Result<(), Error> = object.download_file(&"file_id", "output_path");
You might also like...
Reverse-engineered Rust client for Instagram's Threads app.

Instagram Threads API Unofficial, Reverse-Engineered Rust client for Instagram's Threads. Usage use threads_api::Threads; let client = Threads::new()

Rust library for hardware accelerated drawing of 2D shapes, images, and text, with an easy to use API.
Rust library for hardware accelerated drawing of 2D shapes, images, and text, with an easy to use API.

Speedy2D Hardware-accelerated drawing of shapes, images, and text, with an easy to use API. Speedy2D aims to be: The simplest Rust API for creating a

An API for getting questions from http://either.io implemented fully in Rust, using reqwest and some regex magic. Provides asynchronous and blocking clients respectively.

eithers_rust An API for getting questions from http://either.io implemented fully in Rust, using reqwest and some regex magic. Provides asynchronous a

Code to follow along the "Zero To Production" book on API development in Rust.

Zero To Production / Code (Chapter 10 - Part 1) Zero To Production In Rust is an opinionated introduction to backend development using Rust. This repo

Public aircraft & flightroute api Built in Rust for Docker, using PostgreSQL & Redis

api.adsbdb.com public aircraft & flightroute api Built in Rust for Docker, using PostgreSQL & Redis See typescript branch for original typescript vers

Simple RESTful API in rust created with actix-web. (Routing, models, JWT auth).

rust-simple-api Simple RESTful API created with rust, actix-web, Diesel, JWT. Running application Manual Firstly generate a secret.key which will be u

Simple Rust 🦀 api with Rocket 🚀

Car API Written in Rust & Rocket.rs 🦀 🚀 Running project Running by cargo You just need to run the following command: cargo run Running on docker Fi

Rust wrapper for the LeapC Ultraleap (Leap Motion) hand tracking device API.

LeapRS LeapRS is a safe wrapper for LeapC, the Leap Motion C API. It uses the generated binding provided by leap-sys. This is an API for accessing Lea

🔥Implemetación de una API REST basada en microservicios con Rust
🔥Implemetación de una API REST basada en microservicios con Rust

Microservicios 🚀 Breve Descripción Bienvenido a todos, aquí aprenderás a programar una API REST desde cero enfocada a la aquitectura de microservicio

Owner
WinsomeQuill
Independent scripter. I write as I want! :P
WinsomeQuill
Derive conversion traits when items are structurally similar.

structural-convert Derive conversion traits when items are structurally similar. Inspired by serde and struct-convert crates. Features One to one fiel

Julius Lungys 3 Feb 22, 2024
The second Rust implementation on GitHub of third-party REST API client for Bilibili.

Bilibili REST API The second Rust implementation on GitHub of third-party REST API client for Bilibili. Designed to be lightweight and efficient. It's

null 4 Aug 25, 2022
List public items (public API) of Rust library crates. Enables diffing public API between releases.

cargo wrapper for this library You probably want the cargo wrapper to this library. See https://github.com/Enselic/cargo-public-items. public_items Li

Martin Nordholts 20 Dec 26, 2022
Uma lib para a API do Brasil API (para o Rust)

Uma lib para a API do BrasilAPI (para o Rust) Features CEP (Zip code) DDD Bank CNPJ IBGE Feriados Nacionais Tabela FIPE ISBN Registros de domínios br

Pedro Augusto 6 Dec 13, 2022
💩 Small HTTP client for the Webpurify API following the sans-io approach 🦀

?? tame-webpurify Super simple client for the WebPurify REST API What is this? An incredibly small library to interact with the https://www.webpurify.

Embark 8 May 1, 2023
Rust 核心库和标准库的源码级中文翻译,可作为 IDE 工具的智能提示 (Rust core library and standard library translation. can be used as IntelliSense for IDE tools)

Rust 标准库中文版 这是翻译 Rust 库 的地方, 相关源代码来自于 https://github.com/rust-lang/rust。 如果您不会说英语,那么拥有使用中文的文档至关重要,即使您会说英语,使用母语也仍然能让您感到愉快。Rust 标准库是高质量的,不管是新手还是老手,都可以从中

wtklbm 493 Jan 4, 2023
Tools to feature more lenient Polonius-based borrow-checker patterns in stable Rust

Though this be madness, yet there is method in 't. More context Hamlet: For yourself, sir, shall grow old as I am – if, like a crab, you could go back

Daniel Henry-Mantilla 52 Dec 26, 2022
Tools for managing GitHub block lists

GitHub block list management Octocrabby is a small set of command-line tools and Octocrab extensions that are focused on managing block lists on GitHu

Travis Brown 97 Nov 3, 2022
Fast fail2ban-like tools for parsing nginx logs

Fast2ban This is simple fail2ban-like replacement written in Rust. Usage: ./fast2ban # reads default config.toml from current directory ./fast2ban <co

null 36 May 10, 2023
A collection of crates to make minecraft development (client, server) with rust possible.

rust-craft rust-craft is a collection of crates to make minecraft development (client, server) with rust possible. Motivation There's no better way of

João Victor 15 Mar 23, 2023