Crates.io | deepl |
lib.rs | deepl |
version | |
source | src |
created_at | 2022-09-18 11:37:45.086814 |
updated_at | 2024-12-03 04:37:40.871376 |
description | A Rust implementation of the DeepL API |
homepage | |
repository | https://github.com/Avimitin/deepl-rs |
max_upload_size | |
id | 668579 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Typed HTTP wrapper for interacting with DeepL API. File upload/download is also implemented.
[dependencies]
deepl = "0.6"
use deepl::{DeepLApi, Lang};
let api = DeepLApi::with("YOUR AUTH KEY").new();
let translated = api.translate_text("Hello World", Lang::ZH).await.unwrap();
let sentences = translated.translations;
assert_eq!(sentences[0].text, "你好,世界");
Read examples for more usage.
If you find any bugs in this project or feel confused about any part of the code, feel free to open new issue.
If you want to submit some code modification but don't know how to setup the
code environment, you can follow the
Nix Installation
and enable flakes support.
Then simply run nix develop
in the project root, all the build dependencies will setup
for you.