Tinify API client for Rust 🦀
Tinify API Client for the Rust Programming Language, used for TinyPNG and TinyJPG. Tinify compresses your images intelligently. Read more at https://tinify.com.
Documentation
Go to the documentation for the HTTP client.
Status
In currently development.
There are still features of TinyPNG to implement.
To look at all the features of Tinify API: Documentation.
Roadmap
- Compressing images
- Resizing images
- Converting images
- Preserving metadata
- Saving to Amazon S3
- Saving to Google Cloud Storage
- Implement an async non-blocking Client
Getting Started
Install the API client with Cargo. Add this to Cargo.toml
:
[]
= "1.4.0"
Using async client
[]
= { = "1.4.0", = ["async"] }
Usage
-
About key
Get an API key from https://tinypng.com/developers
-
Compress from a file
use TinifyError;
use Tinify;
use Path;
- Compress from a file async
use TinifyError;
use Tinify;
use Path;
async
Running tests
Create a .env file with a TiniPNG KEY
cargo test --features async
Contribution
All contributions will be welcomed. Feel free to open any issues or pull requests.