12 unstable releases (3 breaking)
0.4.1 | Feb 23, 2023 |
---|---|
0.4.0 | Jan 26, 2023 |
0.3.0 | Jan 10, 2023 |
0.2.1 | Jan 8, 2023 |
0.1.2 | Sep 20, 2022 |
#192 in Authentication
77 downloads per month
40KB
864 lines
DeepL Api
Typed HTTP wrapper for interacting with DeepL API. File upload/download is also implemented.
Usage
[dependencies]
deepl = "0.4"
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.
License
Dependencies
~6–14MB
~278K SLoC